Skip to content

Commit 0c11c64

Browse files
committed
[Test] Avoid reusing the same token name for tests
Relates: #74280
1 parent bcab641 commit 0c11c64

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
@@ -2620,7 +2620,7 @@ public void testCreateServiceAccountToken() throws IOException {
26202620
{
26212621
// tag::create-service-account-token-request
26222622
CreateServiceAccountTokenRequest createServiceAccountTokenRequest =
2623-
new CreateServiceAccountTokenRequest("elastic", "fleet-server", "token1");
2623+
new CreateServiceAccountTokenRequest("elastic", "fleet-server", "my_token_1");
26242624
// end::create-service-account-token-request
26252625

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

0 commit comments

Comments
 (0)