Skip to content

Commit

Permalink
Issue651 tests (opensearch-project#1046)
Browse files Browse the repository at this point in the history
* Implemented filtering on the ISM eplain API

Signed-off-by: Joshua Au <[email protected]>

* Fixed tests for ExplainRequest

Signed-off-by: Joshua Au <[email protected]>

* Added filtering on query and metadata map

Signed-off-by: Joshua Au <[email protected]>

* Filtered on indexNames in metadata

Signed-off-by: Joshua Au <[email protected]>

* Fixed github workflow check errors

Signed-off-by: Joshua Au <[email protected]>

* Removed debugging comments

Signed-off-by: Joshua Au <[email protected]>

* Updated code styling to make more clear

Signed-off-by: Joshua Au <[email protected]>

* Refactored code to match suggestions

Signed-off-by: Joshua Au <[email protected]>

* Added test case for the ExplainFilter.byMetaData and parse methods

Signed-off-by: Joshua Au <[email protected]>

* Started implementation of explain filter IT

Signed-off-by: Joshua Au <[email protected]>

* Implemented test explain filter method

Signed-off-by: Joshua Au <[email protected]>

* Implemented explain filter test on failure

Signed-off-by: Joshua Au <[email protected]>

* Cleaned up log statements

Signed-off-by: Joshua Au <[email protected]>

* Added explain filter test for success

Signed-off-by: Joshua Au <[email protected]>

* Fixed lint errors

Signed-off-by: Joshua Au <[email protected]>

* Removed policy from index to fix flaky tests

Signed-off-by: Joshua Au <[email protected]>

---------

Signed-off-by: Joshua Au <[email protected]>
Signed-off-by: bowenlan-amzn <[email protected]>
Co-authored-by: bowenlan-amzn <[email protected]>
  • Loading branch information
Joshua152 and bowenlan-amzn committed Dec 26, 2023
1 parent a2a1775 commit ac6b791
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,8 @@ abstract class IndexStateManagementRestTestCase : IndexManagementRestTestCase()

protected fun ExplainFilter.toHttpEntity(): HttpEntity = StringEntity(toJsonString(), APPLICATION_JSON)

protected fun ExplainFilter.toHttpEntity(): HttpEntity = StringEntity(toJsonString(), ContentType.APPLICATION_JSON)

protected fun ChangePolicy.toHttpEntity(): HttpEntity {
var string = "{\"${ChangePolicy.POLICY_ID_FIELD}\":\"$policyID\","
if (state != null) {
Expand Down

0 comments on commit ac6b791

Please sign in to comment.