Skip to content

Commit

Permalink
DLS BWC tests
Browse files Browse the repository at this point in the history
Signed-off-by: Nils Bandener <[email protected]>
  • Loading branch information
nibix committed Oct 16, 2024
1 parent 3c9994a commit 7527b98
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ private void ingestData(String index) throws IOException {
);
responses.forEach(r -> assertThat(r.getStatusLine().getStatusCode(), is(200)));
for (Response response : responses) {
log.info("bulk response {}", responseAsMap(response));
Map<String, Object> responseMap = responseAsMap(response);
List<?> itemResults = (List<?>) XContentMapValues.extractValue(responseMap, "items", "index", "result");
assertTrue("More than 0 response items", itemResults.size() > 0);
assertTrue("All results are 'created': " + itemResults, itemResults.stream().allMatch(i -> i.equals("created")));
}
}
}
Expand Down Expand Up @@ -333,7 +336,7 @@ private void createTestRoleIfNotExists(String role) throws IOException {
+ " \"index_patterns\": [\n"
+ " \"test_index*\"\n"
+ " ],\n"
// + " \"dls\": \"{ \\\"bool\\\": { \\\"must\\\": { \\\"match\\\": { \\\"genre\\\": \\\"rock\\\" } } } }\",\n"
+ " \"dls\": \"{ \\\"bool\\\": { \\\"must\\\": { \\\"match\\\": { \\\"genre\\\": \\\"rock\\\" } } } }\",\n"
+ " \"fls\": [\n"
+ " \"~lyrics\"\n"
+ " ],\n"
Expand Down

0 comments on commit 7527b98

Please sign in to comment.