Skip to content

Commit 4d91bea

Browse files
[Test] Fix IndexAliasesTests#testRemoveIndex (#122864) (#122894)
Exclude `.security*` aliases when calling Get Aliases API with the admin superuser. Resolves #122221 (cherry picked from commit ae7d196) # Conflicts: # muted-tests.yml # x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/authz/IndexAliasesTests.java
1 parent 6938e91 commit 4d91bea

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

muted-tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,4 +474,3 @@ tests:
474474
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
475475
method: test {p0=snapshot/10_basic/Create a source only snapshot and then restore it}
476476
issue: https://github.com/elastic/elasticsearch/issues/122755
477-

x-pack/plugin/security/src/internalClusterTest/java/org/elasticsearch/xpack/security/authz/IndexAliasesTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ public void testRemoveIndex() {
802802
assertAcked(client.admin().indices().prepareAliases().removeIndex("*").get());
803803
GetAliasesResponse getAliasesResponse = client.admin().indices().prepareGetAliases().setAliases("*").get();
804804
assertThat(getAliasesResponse.getAliases().size(), equalTo(0));
805-
assertAliases(indicesAdmin().prepareGetAliases().setAliases("*"), "bogus_index_1", "bogus_alias_1", "bogus_alias_2");
805+
assertAliases(indicesAdmin().prepareGetAliases().setAliases("*", "-.security*"), "bogus_index_1", "bogus_alias_1", "bogus_alias_2");
806806
}
807807

808808
public void testAliasesForHiddenIndices() {

0 commit comments

Comments
 (0)