Selaa lähdekoodia

[Test] Fix test assumption for run-as

Service account cannot run-as for the time being.
Yang Wang 3 vuotta sitten
vanhempi
commit
6b50cf75b3

+ 0 - 3
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authc/AuthenticationTests.java

@@ -319,9 +319,6 @@ public class AuthenticationTests extends ESTestCase {
             authentication1,
             m -> assertThat(m, hasEntry("token", Map.of("name", tokenName, "type", tokenType)))
         );
-
-        final Authentication authentication2 = authentication1.runAs(randomUser(), randomRealmRef(false));
-        runWithAuthenticationToXContent(authentication2, m -> assertThat(m, not(hasKey("token"))));
     }
 
     private void runWithAuthenticationToXContent(Authentication authentication, Consumer<Map<String, Object>> consumer) throws IOException {