Skip to content

Commit 6a938f1

Browse files
committed
Assert
1 parent a1e9c5b commit 6a938f1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

x-pack/plugin/security/qa/security-trial/src/javaRestTest/java/org/elasticsearch/xpack/security/failurestore/FailureStoreSecurityRestIT.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,11 +1130,8 @@ protected void createUser(String username, SecureString password, String... role
11301130
getSecurityClient().putUser(new User(username, roles), password);
11311131
}
11321132

1133-
protected void createAndStoreApiKey(String username) throws IOException {
1134-
createAndStoreApiKey(username, null);
1135-
}
1136-
11371133
protected void createAndStoreApiKey(String username, @Nullable String roleDescriptors) throws IOException {
1134+
assertThat("API key already registered for user: " + username, apiKeys.containsKey(username), is(false));
11381135
var request = new Request("POST", "/_security/api_key");
11391136
if (roleDescriptors == null) {
11401137
request.setJsonEntity("""

0 commit comments

Comments
 (0)