Skip to content

Commit 4aabf23

Browse files
committed
[Test] Avoid reusing the same token name for tests
Relates: #74280
1 parent c4b180c commit 4aabf23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SecurityDocumentationIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2617,7 +2617,7 @@ public void testCreateServiceAccountToken() throws IOException {
26172617
{
26182618
// tag::create-service-account-token-request
26192619
CreateServiceAccountTokenRequest createServiceAccountTokenRequest =
2620-
new CreateServiceAccountTokenRequest("elastic", "fleet-server", "token1");
2620+
new CreateServiceAccountTokenRequest("elastic", "fleet-server", "my_token_1");
26212621
// end::create-service-account-token-request
26222622

26232623
// tag::create-service-account-token-execute
@@ -2629,7 +2629,7 @@ public void testCreateServiceAccountToken() throws IOException {
26292629
final String tokenName = createServiceAccountTokenResponse.getName(); // <1>
26302630
final SecureString tokenValue = createServiceAccountTokenResponse.getValue(); // <2>
26312631
// end::create-service-account-token-response
2632-
assertThat(createServiceAccountTokenResponse.getName(), equalTo("token1"));
2632+
assertThat(createServiceAccountTokenResponse.getName(), equalTo("my_token_1"));
26332633
assertNotNull(tokenValue);
26342634
}
26352635

0 commit comments

Comments
 (0)