Skip to content

Commit

Permalink
Test adaptions
Browse files Browse the repository at this point in the history
Signed-off-by: Nils Bandener <nils.bandener@eliatra.com>
  • Loading branch information
nibix committed Jun 24, 2024
1 parent 4df9d3d commit 7cd04a8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,10 @@ public void shouldMSearchDocument_negative() throws IOException {
try (RestHighLevelClient restHighLevelClient = cluster.getRestHighLevelClient(LIMITED_USER)) {
MultiSearchRequest request = new MultiSearchRequest();
request.add(queryStringQueryRequest(FORBIDDEN_INDEX_ALIAS, QUERY_TITLE_POISON));

assertThatThrownBy(() -> restHighLevelClient.msearch(request, DEFAULT), statusException(FORBIDDEN));
MultiSearchResponse response = restHighLevelClient.msearch(request, DEFAULT);
MultiSearchResponse.Item[] responses = response.getResponses();
assertThat(responses, Matchers.arrayWithSize(1));
assertThat(responses[0].getFailure().getMessage(), containsString("no permissions for [indices:data/read/search]"));
}
}

Expand Down

0 comments on commit 7cd04a8

Please sign in to comment.