Skip to content

Commit

Permalink
More
Browse files Browse the repository at this point in the history
  • Loading branch information
n1v0lg committed Nov 3, 2023
1 parent 84584e6 commit be136a7
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,18 +201,18 @@ private void assertAuthenticationHasUsernameAndRoles(
);
}

private void restoreSecurityIndexAvailability() throws IOException {
Request openRequest = new Request("POST", "/.security/_open");
openRequest.setOptions(systemIndexWarningHandlerOptions(".security-7"));
assertOK(adminClient().performRequest(openRequest));
}

private void makeSecurityIndexUnavailable() throws IOException {
Request closeRequest = new Request("POST", "/.security/_close");
closeRequest.setOptions(systemIndexWarningHandlerOptions(".security-7"));
assertOK(adminClient().performRequest(closeRequest));
}

private void restoreSecurityIndexAvailability() throws IOException {
Request openRequest = new Request("POST", "/.security/_open");
openRequest.setOptions(systemIndexWarningHandlerOptions(".security-7"));
assertOK(adminClient().performRequest(openRequest));
}

private RequestOptions.Builder systemIndexWarningHandlerOptions(String index) {
return RequestOptions.DEFAULT.toBuilder()
.setWarningsHandler(
Expand Down

0 comments on commit be136a7

Please sign in to comment.