From 52b6fc54b8d17c9e43b4291fd1625f1d75aee0f2 Mon Sep 17 00:00:00 2001 From: jaymode Date: Thu, 7 Apr 2016 10:54:47 -0400 Subject: [PATCH] test: explicitly initialize anonymous user in ReservedRealmTests Original commit: elastic/x-pack-elasticsearch@46ce5c03a1b5b4f3b01bfe26f91a418915a27054 --- .../elasticsearch/shield/authc/esnative/ReservedRealmTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/authc/esnative/ReservedRealmTests.java b/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/authc/esnative/ReservedRealmTests.java index 8d30d0f6752..a1765ec9334 100644 --- a/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/authc/esnative/ReservedRealmTests.java +++ b/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/authc/esnative/ReservedRealmTests.java @@ -12,6 +12,7 @@ import org.elasticsearch.shield.authc.esnative.NativeUsersStore.ChangeListener; import org.elasticsearch.shield.authc.support.Hasher; import org.elasticsearch.shield.authc.support.SecuredString; import org.elasticsearch.shield.authc.support.UsernamePasswordToken; +import org.elasticsearch.shield.user.AnonymousUser; import org.elasticsearch.shield.user.KibanaUser; import org.elasticsearch.shield.user.User; import org.elasticsearch.shield.user.XPackUser; @@ -40,6 +41,7 @@ public class ReservedRealmTests extends ESTestCase { @Before public void setupMocks() { + AnonymousUser.initialize(Settings.EMPTY); usersStore = mock(NativeUsersStore.class); when(usersStore.started()).thenReturn(true); }