Skip to content

Commit 892d88b

Browse files
[Test] Fix CompositeRolesStoreTests testCacheCleanupOnProjectDeletion (#132168)
Resolves #132158 Resolves #132218
1 parent 4ef3fbd commit 892d88b

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

muted-tests.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,6 @@ tests:
518518
- class: org.elasticsearch.indices.cluster.FieldCapsForceConnectTimeoutIT
519519
method: testTimeoutSetting
520520
issue: https://github.com/elastic/elasticsearch/issues/132179
521-
- class: org.elasticsearch.xpack.security.authz.store.CompositeRolesStoreTests
522-
method: testCacheCleanupOnProjectDeletion
523-
issue: https://github.com/elastic/elasticsearch/issues/132218
524521
- class: org.elasticsearch.test.rest.yaml.MDPYamlTestSuiteIT
525522
method: test {yaml=mdp/10_basic/Index using shared data path}
526523
issue: https://github.com/elastic/elasticsearch/issues/132223
@@ -571,4 +568,4 @@ tests:
571568
# issue: "https://github.com/elastic/elasticsearch/..."
572569
# - class: "org.elasticsearch.xpack.esql.**"
573570
# method: "test {union_types.MultiIndexIpStringStatsInline *}"
574-
# issue: "https://github.com/elastic/elasticsearch/..."
571+
# issue: "https://github.com/elastic/elasticsearch/..."

x-pack/plugin/security/src/test/java/org/elasticsearch/xpack/security/authz/store/CompositeRolesStoreTests.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2313,20 +2313,15 @@ public void testCacheCleanupOnProjectDeletion() throws Exception {
23132313
doCallRealMethod().when(fileRolesStore).accept(anySet(), anyActionListener());
23142314
when(fileRolesStore.roleDescriptors(anySet())).thenReturn(Set.of(roleDescriptor));
23152315

2316-
final NativeRolesStore nativeRolesStore = mock(NativeRolesStore.class);
2317-
doCallRealMethod().when(nativeRolesStore).accept(anySet(), anyActionListener());
2318-
final ReservedRolesStore reservedRolesStore = mock(ReservedRolesStore.class);
2319-
doCallRealMethod().when(reservedRolesStore).accept(anySet(), anyActionListener());
2320-
23212316
final AtomicReference<ProjectId> projectId = new AtomicReference<>(ProjectId.DEFAULT);
23222317
final ProjectResolver projectResolver = TestProjectResolvers.singleProject(projectId::get);
23232318

23242319
CompositeRolesStore compositeRolesStore = buildCompositeRolesStore(
23252320
Settings.EMPTY,
23262321
clusterService,
23272322
fileRolesStore,
2328-
nativeRolesStore,
2329-
reservedRolesStore,
2323+
null,
2324+
null,
23302325
null,
23312326
null,
23322327
null,

0 commit comments

Comments
 (0)