test: cleanup static EnvironmentContext in test to avoid failing the test when they run in reverse order (#69)

Signed-off-by: Michal Vala <mvala@redhat.com>
pull/57/head^2
Michal Vala 2021-07-30 11:31:40 +02:00 committed by GitHub
parent 813218455a
commit 37210828ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -33,6 +33,7 @@ public class KubernetesOidcProviderConfigFactoryTest {
@BeforeMethod
public void setUp() {
EnvironmentContext.reset();
defaultConfig = new ConfigBuilder().build();
}
@ -44,7 +45,7 @@ public class KubernetesOidcProviderConfigFactoryTest {
}
@Test
public void test() {
public void getConfigWithTokenWhenTokenIsSet() {
EnvironmentContext.getCurrent()
.setSubject(new SubjectImpl("test_name", "test_id", TEST_TOKEN, false));