Skip to content

Commit

Permalink
Removing the security audit system index from getting deleted to fix …
Browse files Browse the repository at this point in the history
…the 2.10 integ tests failures (#430)

Signed-off-by: Navneet Verma <navneev@amazon.com>
  • Loading branch information
navneet1v authored Sep 12, 2023
1 parent 9937b18 commit a3da222
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public abstract class OpenSearchSecureRestTestCase extends OpenSearchRestTestCas
private static final String SYS_PROPERTY_KEY_PASSWORD = "password";
private static final String DEFAULT_SOCKET_TIMEOUT = "60s";
private static final String INTERNAL_INDICES_PREFIX = ".";
private static final String SYSTEM_INDEX_PREFIX = "security-auditlog";
private static String protocol;

@Override
Expand Down Expand Up @@ -150,6 +151,10 @@ public void deleteExternalIndices() throws IOException {
.map(index -> (String) index.get("index"))
.filter(indexName -> indexName != null)
.filter(indexName -> !indexName.startsWith(INTERNAL_INDICES_PREFIX))
// This is hack to remove the security audit index from deletion. We will need a proper fix where
// we delete the indices after a test is completed.
// Issue: https://github.com/opensearch-project/geospatial/issues/428
.filter(indexName -> !indexName.startsWith(SYSTEM_INDEX_PREFIX))
.collect(Collectors.toList());

for (String indexName : externalIndices) {
Expand Down

0 comments on commit a3da222

Please sign in to comment.