Skip to content

Commit 828dff0

Browse files
authored
Fix test failure (#116532)
This commit fixes a test failure by using the latest known version instead of the latest version from a map. fixes: #116520
1 parent f529e12 commit 828dff0

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,6 @@ tests:
212212
- class: org.elasticsearch.xpack.searchablesnapshots.SearchableSnapshotsCanMatchOnCoordinatorIntegTests
213213
method: testSearchableSnapshotShardsAreSkippedBySearchRequestWithoutQueryingAnyNodeWhenTheyAreOutsideOfTheQueryRange
214214
issue: https://github.com/elastic/elasticsearch/issues/116523
215-
- class: org.elasticsearch.xpack.core.security.authz.permission.RemoteClusterPermissionsTests
216-
method: testCollapseAndRemoveUnsupportedPrivileges
217-
issue: https://github.com/elastic/elasticsearch/issues/116520
218215
- class: org.elasticsearch.xpack.logsdb.qa.StandardVersusLogsIndexModeRandomDataDynamicMappingChallengeRestIT
219216
method: testMatchAllQuery
220217
issue: https://github.com/elastic/elasticsearch/issues/116536

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/permission/RemoteClusterPermissionsTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ public void testCollapseAndRemoveUnsupportedPrivileges() {
131131
// create random groups with random privileges for random clusters
132132
List<RemoteClusterPermissionGroup> randomGroups = generateRandomGroups(true);
133133
// replace a random value with one that is allowed
134-
String singleValidPrivilege = randomFrom(RemoteClusterPermissions.allowedRemoteClusterPermissions.get(TransportVersion.current()));
134+
String singleValidPrivilege = randomFrom(
135+
RemoteClusterPermissions.allowedRemoteClusterPermissions.get(lastTransportVersionPermission)
136+
);
135137
groupPrivileges.get(0)[0] = singleValidPrivilege;
136138

137139
for (int i = 0; i < randomGroups.size(); i++) {

0 commit comments

Comments
 (0)