Skip to content

Commit

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

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Adjusted integ tests for when security is enabled.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

---------

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit e7e7725)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Apr 30, 2024
1 parent d8288d8 commit 9983f1e
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 9983f1e

Please sign in to comment.