Skip to content

Commit 9a21687

Browse files
fix transport get action tests
the native roles store should never be called to resolve reserved built-in roles
1 parent ad864c7 commit 9a21687

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/action/role/TransportGetRolesActionTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public void testGetWithNativeOnly() {
291291
requestedNames.addAll(requestedStoreNames);
292292
}
293293

294-
final NativeRolesStore rolesStore = mockNativeRolesStore(requestedNames, storeRoleDescriptors);
294+
final NativeRolesStore rolesStore = mockNativeRolesStore(requestedStoreNames, storeRoleDescriptors);
295295

296296
final TransportService transportService = new TransportService(
297297
Settings.EMPTY,
@@ -319,7 +319,7 @@ public void testGetWithNativeOnly() {
319319
verify(rolesStore, times(1)).getRoleDescriptors(eq(new HashSet<>()), anyActionListener());
320320
} else {
321321
assertThat(actualRoleNames, containsInAnyOrder(requestedStoreNames.toArray(Strings.EMPTY_ARRAY)));
322-
verify(rolesStore, times(1)).getRoleDescriptors(eq(new HashSet<>(requestedNames)), anyActionListener());
322+
verify(rolesStore, times(1)).getRoleDescriptors(eq(new HashSet<>(requestedStoreNames)), anyActionListener());
323323
}
324324
}
325325

0 commit comments

Comments
 (0)