Skip to content

Commit

Permalink
Fix test failure (elastic#116532)
Browse files Browse the repository at this point in the history
This commit fixes a test failure by using the latest known version
instead of the latest version from a map.

fixes: elastic#116520
(cherry picked from commit 828dff0)
  • Loading branch information
jakelandis committed Nov 12, 2024
1 parent f76eea0 commit fc3c8d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,6 @@ tests:
issue: https://github.com/elastic/elasticsearch/issues/116593
- class: org.elasticsearch.xpack.kql.query.KqlQueryBuilderTests
issue: https://github.com/elastic/elasticsearch/issues/116487
- class: org.elasticsearch.xpack.core.security.authz.permission.RemoteClusterPermissionsTests
method: testCollapseAndRemoveUnsupportedPrivileges
issue: https://github.com/elastic/elasticsearch/issues/116520
- class: org.elasticsearch.xpack.spatial.search.GeoGridAggAndQueryConsistencyIT
method: testGeoShapeGeoTile
issue: https://github.com/elastic/elasticsearch/issues/115717
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ public void testCollapseAndRemoveUnsupportedPrivileges() {
// create random groups with random privileges for random clusters
List<RemoteClusterPermissionGroup> randomGroups = generateRandomGroups(true);
// replace a random value with one that is allowed
String singleValidPrivilege = randomFrom(RemoteClusterPermissions.allowedRemoteClusterPermissions.get(TransportVersion.current()));
String singleValidPrivilege = randomFrom(
RemoteClusterPermissions.allowedRemoteClusterPermissions.get(lastTransportVersionPermission)
);
groupPrivileges.get(0)[0] = singleValidPrivilege;

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

0 comments on commit fc3c8d0

Please sign in to comment.