Skip to content

Commit

Permalink
Remove test that relied on JWT feature flag
Browse files Browse the repository at this point in the history
The testJwtRealmDependsOnBuildType test assumed that JWT was behind a
feature flag which is no longer the case

Resolves: elastic#85407
  • Loading branch information
tvernum committed May 5, 2022
1 parent ba91f26 commit 2b5fb1a
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/
package org.elasticsearch.xpack.security.authc;

import org.elasticsearch.Build;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.env.Environment;
Expand All @@ -21,7 +20,6 @@
import org.elasticsearch.xpack.core.security.authc.RealmConfig;
import org.elasticsearch.xpack.core.security.authc.RealmSettings;
import org.elasticsearch.xpack.core.security.authc.esnative.NativeRealmSettings;
import org.elasticsearch.xpack.core.security.authc.jwt.JwtRealmSettings;
import org.elasticsearch.xpack.core.security.authc.ldap.LdapRealmSettings;
import org.elasticsearch.xpack.core.security.authc.pki.PkiRealmSettings;
import org.elasticsearch.xpack.core.ssl.SSLService;
Expand Down Expand Up @@ -109,16 +107,6 @@ public void testEachRealmHasRegisteredOrderSetting() {
assertThat(registeredOrderKeys, Matchers.equalTo(configurableOrderKeys));
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/85407")
public void testJwtRealmDependsOnBuildType() {
// Whether the JWT realm is registered depends on the build type
if (Build.CURRENT.isSnapshot()) {
assertThat(InternalRealms.isInternalRealm(JwtRealmSettings.TYPE), is(true));
} else {
assertThat(InternalRealms.isInternalRealm(JwtRealmSettings.TYPE), is(false));
}
}

private boolean isStandardRealm(String type) {
return switch (type) {
case LdapRealmSettings.LDAP_TYPE, LdapRealmSettings.AD_TYPE, PkiRealmSettings.TYPE -> true;
Expand Down

0 comments on commit 2b5fb1a

Please sign in to comment.