Skip to content

Commit 4ad1b5b

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

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
@@ -327,9 +327,6 @@ tests:
327327
issue: https://github.com/elastic/elasticsearch/issues/116593
328328
- class: org.elasticsearch.xpack.kql.query.KqlQueryBuilderTests
329329
issue: https://github.com/elastic/elasticsearch/issues/116487
330-
- class: org.elasticsearch.xpack.core.security.authz.permission.RemoteClusterPermissionsTests
331-
method: testCollapseAndRemoveUnsupportedPrivileges
332-
issue: https://github.com/elastic/elasticsearch/issues/116520
333330
- class: org.elasticsearch.xpack.spatial.search.GeoGridAggAndQueryConsistencyIT
334331
method: testGeoShapeGeoTile
335332
issue: https://github.com/elastic/elasticsearch/issues/115717

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)