Skip to content

Commit

Permalink
Fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
justincr-elastic committed Oct 25, 2021
1 parent ac36557 commit 15e140a
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -36,8 +36,8 @@ public void testAuthenticationWithApiKeyAllowsAccessToApiKeyActionsWhenItIsOwner

final String apiKeyId = randomAlphaOfLengthBetween(4, 7);
final HashMap<String,Object> metadata = new HashMap<>();
metadata.put(AuthenticationField.API_KEY_ID_KEY, randomAlphaOfLength(7));
metadata.put(AuthenticationField.API_KEY_NAME_KEY, randomBoolean() ? null : randomAlphaOfLengthBetween(1, 16));
metadata.put(AuthenticationField.API_KEY_ID_KEY, apiKeyId);
metadata.put(AuthenticationField.API_KEY_NAME_KEY, randomAlphaOfLengthBetween(1, 16));
final Authentication authentication = createMockAuthentication("joe", "_es_api_key",
AuthenticationType.API_KEY, metadata);
final TransportRequest getApiKeyRequest = GetApiKeyRequest.usingApiKeyId(apiKeyId, randomBoolean());
Expand Down

0 comments on commit 15e140a

Please sign in to comment.