test: explicitly initialize anonymous user in ReservedRealmTests

Original commit: elastic/x-pack-elasticsearch@46ce5c03a1
This commit is contained in:
jaymode 2016-04-07 10:54:47 -04:00
parent 8049a82953
commit 52b6fc54b8
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}