Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing the security audit system index from getting deleted to fix the 2.10 integ tests failures #430

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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