Skip to content

Commit

Permalink
Adjusted integ tests for when security is enabled. (#1528) (#1530)
Browse files Browse the repository at this point in the history
* Adjusted integ tests for when security is enabled.



* Adjusted integ tests for when security is enabled.



---------


(cherry picked from commit e7e7725)

Signed-off-by: AWSHurneyt <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent d8288d8 commit 5a657aa
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down Expand Up @@ -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 ->
Expand Down Expand Up @@ -197,7 +201,8 @@ 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 ->
Expand Down

0 comments on commit 5a657aa

Please sign in to comment.