Fix compilation after elastic/elasticsearchelastic/elasticsearch#22608
Original commit: elastic/x-pack-elasticsearch@5ce843283a
This commit is contained in:
parent
89405c783f
commit
d50ffd6dc3
|
@ -53,7 +53,7 @@ public class TransportXPackInfoActionTests extends ESTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportXPackInfoAction action = new TransportXPackInfoAction(Settings.EMPTY, mock(ThreadPool.class), transportService,
|
TransportXPackInfoAction action = new TransportXPackInfoAction(Settings.EMPTY, mock(ThreadPool.class), transportService,
|
||||||
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), licenseService, featureSets);
|
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), licenseService, featureSets);
|
||||||
|
|
||||||
|
|
|
@ -91,11 +91,11 @@ public class TransportMonitoringBulkActionTests extends ESTestCase {
|
||||||
Set<Setting<?>> clusterSettings = new HashSet<>();
|
Set<Setting<?>> clusterSettings = new HashSet<>();
|
||||||
clusterSettings.addAll(ClusterSettings.BUILT_IN_CLUSTER_SETTINGS);
|
clusterSettings.addAll(ClusterSettings.BUILT_IN_CLUSTER_SETTINGS);
|
||||||
clusterSettings.add(MonitoringSettings.EXPORTERS_SETTINGS);
|
clusterSettings.add(MonitoringSettings.EXPORTERS_SETTINGS);
|
||||||
|
final DiscoveryNode node = new DiscoveryNode("node", buildNewFakeTransportAddress(), emptyMap(), emptySet(),
|
||||||
|
Version.CURRENT);
|
||||||
clusterService = new ClusterService(Settings.builder().put("cluster.name",
|
clusterService = new ClusterService(Settings.builder().put("cluster.name",
|
||||||
TransportMonitoringBulkActionTests.class.getName()).build(),
|
TransportMonitoringBulkActionTests.class.getName()).build(),
|
||||||
new ClusterSettings(Settings.EMPTY, clusterSettings), threadPool);
|
new ClusterSettings(Settings.EMPTY, clusterSettings), threadPool, () -> node);
|
||||||
clusterService.setLocalNode(new DiscoveryNode("node", buildNewFakeTransportAddress(), emptyMap(), emptySet(),
|
|
||||||
Version.CURRENT));
|
|
||||||
clusterService.setNodeConnectionsService(new NodeConnectionsService(Settings.EMPTY, null, null) {
|
clusterService.setNodeConnectionsService(new NodeConnectionsService(Settings.EMPTY, null, null) {
|
||||||
@Override
|
@Override
|
||||||
public void connectToNodes(Iterable<DiscoveryNode> discoveryNodes) {
|
public void connectToNodes(Iterable<DiscoveryNode> discoveryNodes) {
|
||||||
|
@ -113,7 +113,7 @@ public class TransportMonitoringBulkActionTests extends ESTestCase {
|
||||||
clusterService.start();
|
clusterService.start();
|
||||||
|
|
||||||
transportService = new TransportService(clusterService.getSettings(), transport, threadPool,
|
transportService = new TransportService(clusterService.getSettings(), transport, threadPool,
|
||||||
TransportService.NOOP_TRANSPORT_INTERCEPTOR, null);
|
TransportService.NOOP_TRANSPORT_INTERCEPTOR, x -> node, null);
|
||||||
transportService.start();
|
transportService.start();
|
||||||
transportService.acceptIncomingRequests();
|
transportService.acceptIncomingRequests();
|
||||||
exportService = new CapturingExporters();
|
exportService = new CapturingExporters();
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class TransportDeleteRoleActionTests extends ESTestCase {
|
||||||
final String roleName = randomFrom(new ArrayList<>(ReservedRolesStore.names()));
|
final String roleName = randomFrom(new ArrayList<>(ReservedRolesStore.names()));
|
||||||
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
(x) -> null, null);
|
||||||
TransportDeleteRoleAction action = new TransportDeleteRoleAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportDeleteRoleAction action = new TransportDeleteRoleAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), rolesStore, transportService);
|
mock(IndexNameExpressionResolver.class), rolesStore, transportService);
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ public class TransportDeleteRoleActionTests extends ESTestCase {
|
||||||
final String roleName = randomFrom("admin", "dept_a", "restricted");
|
final String roleName = randomFrom("admin", "dept_a", "restricted");
|
||||||
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
(x) -> null, null);
|
||||||
TransportDeleteRoleAction action = new TransportDeleteRoleAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportDeleteRoleAction action = new TransportDeleteRoleAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), rolesStore, transportService);
|
mock(IndexNameExpressionResolver.class), rolesStore, transportService);
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ public class TransportDeleteRoleActionTests extends ESTestCase {
|
||||||
final String roleName = randomFrom("admin", "dept_a", "restricted");
|
final String roleName = randomFrom("admin", "dept_a", "restricted");
|
||||||
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
(x) -> null, null);
|
||||||
TransportDeleteRoleAction action = new TransportDeleteRoleAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportDeleteRoleAction action = new TransportDeleteRoleAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), rolesStore, transportService);
|
mock(IndexNameExpressionResolver.class), rolesStore, transportService);
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class TransportGetRolesActionTests extends ESTestCase {
|
||||||
public void testReservedRoles() {
|
public void testReservedRoles() {
|
||||||
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportGetRolesAction action = new TransportGetRolesAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportGetRolesAction action = new TransportGetRolesAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), rolesStore, transportService, new ReservedRolesStore());
|
mock(IndexNameExpressionResolver.class), rolesStore, transportService, new ReservedRolesStore());
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ public class TransportGetRolesActionTests extends ESTestCase {
|
||||||
final List<RoleDescriptor> storeRoleDescriptors = randomRoleDescriptors();
|
final List<RoleDescriptor> storeRoleDescriptors = randomRoleDescriptors();
|
||||||
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportGetRolesAction action = new TransportGetRolesAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportGetRolesAction action = new TransportGetRolesAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), rolesStore, transportService, new ReservedRolesStore());
|
mock(IndexNameExpressionResolver.class), rolesStore, transportService, new ReservedRolesStore());
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ public class TransportGetRolesActionTests extends ESTestCase {
|
||||||
|
|
||||||
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportGetRolesAction action = new TransportGetRolesAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportGetRolesAction action = new TransportGetRolesAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), rolesStore, transportService, new ReservedRolesStore());
|
mock(IndexNameExpressionResolver.class), rolesStore, transportService, new ReservedRolesStore());
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ public class TransportGetRolesActionTests extends ESTestCase {
|
||||||
final List<RoleDescriptor> storeRoleDescriptors = randomRoleDescriptors();
|
final List<RoleDescriptor> storeRoleDescriptors = randomRoleDescriptors();
|
||||||
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportGetRolesAction action = new TransportGetRolesAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportGetRolesAction action = new TransportGetRolesAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), rolesStore, transportService, new ReservedRolesStore());
|
mock(IndexNameExpressionResolver.class), rolesStore, transportService, new ReservedRolesStore());
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class TransportPutRoleActionTests extends ESTestCase {
|
||||||
final String roleName = randomFrom(new ArrayList<>(ReservedRolesStore.names()));
|
final String roleName = randomFrom(new ArrayList<>(ReservedRolesStore.names()));
|
||||||
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportPutRoleAction action = new TransportPutRoleAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportPutRoleAction action = new TransportPutRoleAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), rolesStore, transportService);
|
mock(IndexNameExpressionResolver.class), rolesStore, transportService);
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ public class TransportPutRoleActionTests extends ESTestCase {
|
||||||
final String roleName = randomFrom("admin", "dept_a", "restricted");
|
final String roleName = randomFrom("admin", "dept_a", "restricted");
|
||||||
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportPutRoleAction action = new TransportPutRoleAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportPutRoleAction action = new TransportPutRoleAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), rolesStore, transportService);
|
mock(IndexNameExpressionResolver.class), rolesStore, transportService);
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ public class TransportPutRoleActionTests extends ESTestCase {
|
||||||
final String roleName = randomFrom("admin", "dept_a", "restricted");
|
final String roleName = randomFrom("admin", "dept_a", "restricted");
|
||||||
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
NativeRolesStore rolesStore = mock(NativeRolesStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportPutRoleAction action = new TransportPutRoleAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportPutRoleAction action = new TransportPutRoleAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), rolesStore, transportService);
|
mock(IndexNameExpressionResolver.class), rolesStore, transportService);
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class TransportAuthenticateActionTests extends ESTestCase {
|
||||||
SecurityContext securityContext = mock(SecurityContext.class);
|
SecurityContext securityContext = mock(SecurityContext.class);
|
||||||
when(securityContext.getUser()).thenReturn(randomFrom(SystemUser.INSTANCE, XPackUser.INSTANCE));
|
when(securityContext.getUser()).thenReturn(randomFrom(SystemUser.INSTANCE, XPackUser.INSTANCE));
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportAuthenticateAction action = new TransportAuthenticateAction(Settings.EMPTY, mock(ThreadPool.class), transportService,
|
TransportAuthenticateAction action = new TransportAuthenticateAction(Settings.EMPTY, mock(ThreadPool.class), transportService,
|
||||||
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), securityContext);
|
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), securityContext);
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class TransportAuthenticateActionTests extends ESTestCase {
|
||||||
public void testNullUser() {
|
public void testNullUser() {
|
||||||
SecurityContext securityContext = mock(SecurityContext.class);
|
SecurityContext securityContext = mock(SecurityContext.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportAuthenticateAction action = new TransportAuthenticateAction(Settings.EMPTY, mock(ThreadPool.class), transportService,
|
TransportAuthenticateAction action = new TransportAuthenticateAction(Settings.EMPTY, mock(ThreadPool.class), transportService,
|
||||||
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), securityContext);
|
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), securityContext);
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ public class TransportAuthenticateActionTests extends ESTestCase {
|
||||||
SecurityContext securityContext = mock(SecurityContext.class);
|
SecurityContext securityContext = mock(SecurityContext.class);
|
||||||
when(securityContext.getUser()).thenReturn(user);
|
when(securityContext.getUser()).thenReturn(user);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportAuthenticateAction action = new TransportAuthenticateAction(Settings.EMPTY, mock(ThreadPool.class), transportService,
|
TransportAuthenticateAction action = new TransportAuthenticateAction(Settings.EMPTY, mock(ThreadPool.class), transportService,
|
||||||
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), securityContext);
|
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), securityContext);
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class TransportChangePasswordActionTests extends ESTestCase {
|
||||||
AnonymousUser anonymousUser = new AnonymousUser(settings);
|
AnonymousUser anonymousUser = new AnonymousUser(settings);
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportChangePasswordAction action = new TransportChangePasswordAction(settings, mock(ThreadPool.class), transportService,
|
TransportChangePasswordAction action = new TransportChangePasswordAction(settings, mock(ThreadPool.class), transportService,
|
||||||
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ public class TransportChangePasswordActionTests extends ESTestCase {
|
||||||
public void testInternalUsers() {
|
public void testInternalUsers() {
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportChangePasswordAction action = new TransportChangePasswordAction(Settings.EMPTY, mock(ThreadPool.class), transportService,
|
TransportChangePasswordAction action = new TransportChangePasswordAction(Settings.EMPTY, mock(ThreadPool.class), transportService,
|
||||||
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ public class TransportChangePasswordActionTests extends ESTestCase {
|
||||||
}
|
}
|
||||||
}).when(usersStore).changePassword(eq(request), any(ActionListener.class));
|
}).when(usersStore).changePassword(eq(request), any(ActionListener.class));
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportChangePasswordAction action = new TransportChangePasswordAction(Settings.EMPTY, mock(ThreadPool.class), transportService,
|
TransportChangePasswordAction action = new TransportChangePasswordAction(Settings.EMPTY, mock(ThreadPool.class), transportService,
|
||||||
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ public class TransportChangePasswordActionTests extends ESTestCase {
|
||||||
}
|
}
|
||||||
}).when(usersStore).changePassword(eq(request), any(ActionListener.class));
|
}).when(usersStore).changePassword(eq(request), any(ActionListener.class));
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportChangePasswordAction action = new TransportChangePasswordAction(Settings.EMPTY, mock(ThreadPool.class), transportService,
|
TransportChangePasswordAction action = new TransportChangePasswordAction(Settings.EMPTY, mock(ThreadPool.class), transportService,
|
||||||
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class TransportDeleteUserActionTests extends ESTestCase {
|
||||||
Settings settings = Settings.builder().put(AnonymousUser.ROLES_SETTING.getKey(), "superuser").build();
|
Settings settings = Settings.builder().put(AnonymousUser.ROLES_SETTING.getKey(), "superuser").build();
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportDeleteUserAction action = new TransportDeleteUserAction(settings, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportDeleteUserAction action = new TransportDeleteUserAction(settings, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ public class TransportDeleteUserActionTests extends ESTestCase {
|
||||||
public void testInternalUser() {
|
public void testInternalUser() {
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportDeleteUserAction action = new TransportDeleteUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportDeleteUserAction action = new TransportDeleteUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ public class TransportDeleteUserActionTests extends ESTestCase {
|
||||||
final User reserved = randomFrom(new ElasticUser(true), new KibanaUser(true));
|
final User reserved = randomFrom(new ElasticUser(true), new KibanaUser(true));
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportDeleteUserAction action = new TransportDeleteUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportDeleteUserAction action = new TransportDeleteUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ public class TransportDeleteUserActionTests extends ESTestCase {
|
||||||
final User user = new User("joe");
|
final User user = new User("joe");
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportDeleteUserAction action = new TransportDeleteUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportDeleteUserAction action = new TransportDeleteUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ public class TransportDeleteUserActionTests extends ESTestCase {
|
||||||
final User user = new User("joe");
|
final User user = new User("joe");
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportDeleteUserAction action = new TransportDeleteUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportDeleteUserAction action = new TransportDeleteUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
*/
|
*/
|
||||||
package org.elasticsearch.xpack.security.action.user;
|
package org.elasticsearch.xpack.security.action.user;
|
||||||
|
|
||||||
import org.apache.log4j.Level;
|
|
||||||
import org.apache.log4j.Logger;
|
|
||||||
import org.elasticsearch.ElasticsearchSecurityException;
|
import org.elasticsearch.ElasticsearchSecurityException;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.support.ActionFilters;
|
import org.elasticsearch.action.support.ActionFilters;
|
||||||
|
@ -77,7 +75,7 @@ public class TransportGetUsersActionTests extends ESTestCase {
|
||||||
AnonymousUser anonymousUser = new AnonymousUser(settings);
|
AnonymousUser anonymousUser = new AnonymousUser(settings);
|
||||||
ReservedRealm reservedRealm = new ReservedRealm(mock(Environment.class), settings, usersStore, anonymousUser);
|
ReservedRealm reservedRealm = new ReservedRealm(mock(Environment.class), settings, usersStore, anonymousUser);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportGetUsersAction action = new TransportGetUsersAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportGetUsersAction action = new TransportGetUsersAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService, reservedRealm);
|
mock(IndexNameExpressionResolver.class), usersStore, transportService, reservedRealm);
|
||||||
|
|
||||||
|
@ -112,7 +110,7 @@ public class TransportGetUsersActionTests extends ESTestCase {
|
||||||
public void testInternalUser() {
|
public void testInternalUser() {
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportGetUsersAction action = new TransportGetUsersAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportGetUsersAction action = new TransportGetUsersAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService, mock(ReservedRealm.class));
|
mock(IndexNameExpressionResolver.class), usersStore, transportService, mock(ReservedRealm.class));
|
||||||
|
|
||||||
|
@ -153,7 +151,7 @@ public class TransportGetUsersActionTests extends ESTestCase {
|
||||||
final List<User> reservedUsers = randomSubsetOf(size, allReservedUsers);
|
final List<User> reservedUsers = randomSubsetOf(size, allReservedUsers);
|
||||||
final List<String> names = reservedUsers.stream().map(User::principal).collect(Collectors.toList());
|
final List<String> names = reservedUsers.stream().map(User::principal).collect(Collectors.toList());
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportGetUsersAction action = new TransportGetUsersAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportGetUsersAction action = new TransportGetUsersAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService, reservedRealm);
|
mock(IndexNameExpressionResolver.class), usersStore, transportService, reservedRealm);
|
||||||
|
|
||||||
|
@ -189,7 +187,7 @@ public class TransportGetUsersActionTests extends ESTestCase {
|
||||||
ReservedRealmTests.mockGetAllReservedUserInfo(usersStore, Collections.emptyMap());
|
ReservedRealmTests.mockGetAllReservedUserInfo(usersStore, Collections.emptyMap());
|
||||||
ReservedRealm reservedRealm = new ReservedRealm(mock(Environment.class), settings, usersStore, new AnonymousUser(settings));
|
ReservedRealm reservedRealm = new ReservedRealm(mock(Environment.class), settings, usersStore, new AnonymousUser(settings));
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportGetUsersAction action = new TransportGetUsersAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportGetUsersAction action = new TransportGetUsersAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService, reservedRealm);
|
mock(IndexNameExpressionResolver.class), usersStore, transportService, reservedRealm);
|
||||||
|
|
||||||
|
@ -236,7 +234,7 @@ public class TransportGetUsersActionTests extends ESTestCase {
|
||||||
final String[] storeUsernames = storeUsers.stream().map(User::principal).collect(Collectors.toList()).toArray(Strings.EMPTY_ARRAY);
|
final String[] storeUsernames = storeUsers.stream().map(User::principal).collect(Collectors.toList()).toArray(Strings.EMPTY_ARRAY);
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportGetUsersAction action = new TransportGetUsersAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportGetUsersAction action = new TransportGetUsersAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService, mock(ReservedRealm.class));
|
mock(IndexNameExpressionResolver.class), usersStore, transportService, mock(ReservedRealm.class));
|
||||||
|
|
||||||
|
@ -284,7 +282,7 @@ public class TransportGetUsersActionTests extends ESTestCase {
|
||||||
final String[] storeUsernames = storeUsers.stream().map(User::principal).collect(Collectors.toList()).toArray(Strings.EMPTY_ARRAY);
|
final String[] storeUsernames = storeUsers.stream().map(User::principal).collect(Collectors.toList()).toArray(Strings.EMPTY_ARRAY);
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportGetUsersAction action = new TransportGetUsersAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportGetUsersAction action = new TransportGetUsersAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService, mock(ReservedRealm.class));
|
mock(IndexNameExpressionResolver.class), usersStore, transportService, mock(ReservedRealm.class));
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class TransportPutUserActionTests extends ESTestCase {
|
||||||
final AnonymousUser anonymousUser = new AnonymousUser(settings);
|
final AnonymousUser anonymousUser = new AnonymousUser(settings);
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportPutUserAction action = new TransportPutUserAction(settings, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportPutUserAction action = new TransportPutUserAction(settings, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ public class TransportPutUserActionTests extends ESTestCase {
|
||||||
public void testSystemUser() {
|
public void testSystemUser() {
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportPutUserAction action = new TransportPutUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportPutUserAction action = new TransportPutUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ public class TransportPutUserActionTests extends ESTestCase {
|
||||||
reservedRealm.users(userFuture);
|
reservedRealm.users(userFuture);
|
||||||
final User reserved = randomFrom(userFuture.actionGet().toArray(new User[0]));
|
final User reserved = randomFrom(userFuture.actionGet().toArray(new User[0]));
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportPutUserAction action = new TransportPutUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportPutUserAction action = new TransportPutUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ public class TransportPutUserActionTests extends ESTestCase {
|
||||||
final User user = new User("joe");
|
final User user = new User("joe");
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportPutUserAction action = new TransportPutUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportPutUserAction action = new TransportPutUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ public class TransportPutUserActionTests extends ESTestCase {
|
||||||
final User user = new User("joe");
|
final User user = new User("joe");
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportPutUserAction action = new TransportPutUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
TransportPutUserAction action = new TransportPutUserAction(Settings.EMPTY, mock(ThreadPool.class), mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
mock(IndexNameExpressionResolver.class), usersStore, transportService);
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class TransportSetEnabledActionTests extends ESTestCase {
|
||||||
when(authentication.getRunAsUser()).thenReturn(user);
|
when(authentication.getRunAsUser()).thenReturn(user);
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportSetEnabledAction action = new TransportSetEnabledAction(settings, threadPool, transportService, mock(ActionFilters.class),
|
TransportSetEnabledAction action = new TransportSetEnabledAction(settings, threadPool, transportService, mock(ActionFilters.class),
|
||||||
mock(IndexNameExpressionResolver.class), usersStore);
|
mock(IndexNameExpressionResolver.class), usersStore);
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public class TransportSetEnabledActionTests extends ESTestCase {
|
||||||
when(authentication.getRunAsUser()).thenReturn(user);
|
when(authentication.getRunAsUser()).thenReturn(user);
|
||||||
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
NativeUsersStore usersStore = mock(NativeUsersStore.class);
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportSetEnabledAction action = new TransportSetEnabledAction(Settings.EMPTY, threadPool, transportService,
|
TransportSetEnabledAction action = new TransportSetEnabledAction(Settings.EMPTY, threadPool, transportService,
|
||||||
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ public class TransportSetEnabledActionTests extends ESTestCase {
|
||||||
}).when(usersStore)
|
}).when(usersStore)
|
||||||
.setEnabled(eq(user.principal()), eq(request.enabled()), eq(request.getRefreshPolicy()), any(ActionListener.class));
|
.setEnabled(eq(user.principal()), eq(request.enabled()), eq(request.getRefreshPolicy()), any(ActionListener.class));
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportSetEnabledAction action = new TransportSetEnabledAction(Settings.EMPTY, threadPool, transportService,
|
TransportSetEnabledAction action = new TransportSetEnabledAction(Settings.EMPTY, threadPool, transportService,
|
||||||
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@ public class TransportSetEnabledActionTests extends ESTestCase {
|
||||||
}).when(usersStore)
|
}).when(usersStore)
|
||||||
.setEnabled(eq(user.principal()), eq(request.enabled()), eq(request.getRefreshPolicy()), any(ActionListener.class));
|
.setEnabled(eq(user.principal()), eq(request.enabled()), eq(request.getRefreshPolicy()), any(ActionListener.class));
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportSetEnabledAction action = new TransportSetEnabledAction(Settings.EMPTY, threadPool, transportService,
|
TransportSetEnabledAction action = new TransportSetEnabledAction(Settings.EMPTY, threadPool, transportService,
|
||||||
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ public class TransportSetEnabledActionTests extends ESTestCase {
|
||||||
request.enabled(randomBoolean());
|
request.enabled(randomBoolean());
|
||||||
request.setRefreshPolicy(randomFrom(RefreshPolicy.values()));
|
request.setRefreshPolicy(randomFrom(RefreshPolicy.values()));
|
||||||
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
TransportService transportService = new TransportService(Settings.EMPTY, null, null, TransportService.NOOP_TRANSPORT_INTERCEPTOR,
|
||||||
null);
|
x -> null, null);
|
||||||
TransportSetEnabledAction action = new TransportSetEnabledAction(Settings.EMPTY, threadPool, transportService,
|
TransportSetEnabledAction action = new TransportSetEnabledAction(Settings.EMPTY, threadPool, transportService,
|
||||||
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
mock(ActionFilters.class), mock(IndexNameExpressionResolver.class), usersStore);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue