Skip to content

Commit

Permalink
Adjusted integ tests for when security is enabled.
Browse files Browse the repository at this point in the history
Signed-off-by: AWSHurneyt <[email protected]>
AWSHurneyt committed Apr 30, 2024
1 parent 65acca1 commit 755f61f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -101,7 +101,9 @@ class GetRemoteIndexesActionIT : AlertingRestTestCase() {

assertNotNull(clusterDetails[ClusterIndexes.INDEXES_FIELD])
val indexes = clusterDetails[ClusterIndexes.INDEXES_FIELD] as Map<String, Map<String, Any>>
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 ->
@@ -149,7 +151,9 @@ class GetRemoteIndexesActionIT : AlertingRestTestCase() {

assertNotNull(clusterDetails[ClusterIndexes.INDEXES_FIELD])
val indexes = clusterDetails[ClusterIndexes.INDEXES_FIELD] as Map<String, Map<String, Any>>
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 ->

0 comments on commit 755f61f

Please sign in to comment.