Skip to content

Commit e3cc113

Browse files
committed
Cleanup
Signed-off-by: Nils Bandener <[email protected]>
1 parent 6fd7108 commit e3cc113

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed

src/integrationTest/java/org/opensearch/security/privileges/int_tests/IndexAuthorizationReadOnlyIntTests.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -867,28 +867,6 @@ public void search_alias_pattern_negation() throws Exception {
867867
.reducedBy(user.indexMatcher("read"))
868868
.whenEmpty(clusterConfig.allowsEmptyResultSets ? isOk() : isForbidden())
869869
);
870-
/*
871-
if (user != LIMITED_USER_NONE) {
872-
if (clusterConfig.systemIndexPrivilegeEnabled) {
873-
// If the system index privilege is enabled, we might also see the system_index_plugin index (being included via the
874-
// alias)
875-
assertThat(
876-
httpResponse,
877-
containsExactly(index_a1, index_a2, index_a3, index_b1, index_c1).at("hits.hits[*]._index")
878-
.reducedBy(user.indexMatcher("read"))
879-
.whenEmpty(clusterConfig.allowsEmptyResultSets ? isOk() : isForbidden())
880-
);
881-
} else {
882-
assertThat(
883-
httpResponse,
884-
containsExactly(index_a1, index_a2, index_a3, index_b1, index_c1).at("hits.hits[*]._index")
885-
.reducedBy(user.indexMatcher("read"))
886-
.whenEmpty(clusterConfig.allowsEmptyResultSets ? isOk() : isForbidden())
887-
);
888-
}
889-
} else {
890-
assertThat(httpResponse, isForbidden());
891-
}*/
892870
}
893871
}
894872

src/integrationTest/java/org/opensearch/security/privileges/int_tests/IndexAuthorizationReadWriteIntTests.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,6 @@ public void putDocument_bulk_alias() throws Exception {
748748
} else {
749749
assertThat(httpResponse, isForbidden());
750750
}
751-
752751
} finally {
753752
delete("index_aw1/_doc/put_doc_alias_bulk_test_1");
754753
}
@@ -868,7 +867,6 @@ public void deleteAlias_staticIndex() throws Exception {
868867
assertThat(httpResponse, isForbidden());
869868
}
870869
}
871-
872870
} finally {
873871
delete(alias_bwx);
874872
}
@@ -1118,20 +1116,12 @@ public void rollover_explicitTargetIndex() throws Exception {
11181116
}
11191117
}""");
11201118

1121-
System.out.println(httpResponse.getBody());
1122-
11231119
if (clusterConfig.legacyPrivilegeEvaluation) {
11241120
if (user.indexMatcher("manage_alias").covers(index_bw1) && user.indexMatcher("manage_index").covers(index_bw2)) {
11251121
assertThat(httpResponse, isOk());
11261122
} else {
11271123
assertThat(httpResponse, isForbidden());
11281124
}
1129-
} else {
1130-
if (user.indexMatcher("manage_alias").covers(alias_bwx) && user.indexMatcher("manage_index").covers(index_bw2)) {
1131-
assertThat(httpResponse, isOk());
1132-
} else {
1133-
assertThat(httpResponse, isForbidden());
1134-
}
11351125
}
11361126
} finally {
11371127
delete(alias_bwx, index_bwx1);

0 commit comments

Comments
 (0)