test: explicitly initialize anonymous user in ReservedRealmTests
Original commit: elastic/x-pack-elasticsearch@46ce5c03a1
This commit is contained in:
parent
8049a82953
commit
52b6fc54b8
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue