From 9aa11709fb5662d7398b2071863c1ef8d90918de Mon Sep 17 00:00:00 2001 From: Navneet Verma Date: Tue, 12 Sep 2023 12:29:38 -0700 Subject: [PATCH] Removing the security audit system index from getting deleted to fix the 2.10 integ tests failures Signed-off-by: Navneet Verma --- .../opensearch/geospatial/OpenSearchSecureRestTestCase.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/java/org/opensearch/geospatial/OpenSearchSecureRestTestCase.java b/src/test/java/org/opensearch/geospatial/OpenSearchSecureRestTestCase.java index cb26b7be..dba3364e 100644 --- a/src/test/java/org/opensearch/geospatial/OpenSearchSecureRestTestCase.java +++ b/src/test/java/org/opensearch/geospatial/OpenSearchSecureRestTestCase.java @@ -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 @@ -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) {