diff --git a/alerting/src/test/kotlin/org/opensearch/alerting/transport/GetRemoteIndexesActionIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/transport/GetRemoteIndexesActionIT.kt index 9b29e499d..0b9282d10 100644 --- a/alerting/src/test/kotlin/org/opensearch/alerting/transport/GetRemoteIndexesActionIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/transport/GetRemoteIndexesActionIT.kt @@ -201,7 +201,8 @@ class GetRemoteIndexesActionIT : AlertingRestTestCase() { assertNotNull(clusterDetails[ClusterIndexes.INDEXES_FIELD]) val indexes = clusterDetails[ClusterIndexes.INDEXES_FIELD] as Map> - assertEquals(expectedNames.size, indexes.keys.size) + // Skipping this assert when security is enabled as it doesn't consider the existence of system indexes. + if (!securityEnabled()) assertEquals(expectedNames.size, indexes.keys.size) // Validate index-level response details expectedNames.forEach { indexName ->