aboutsummaryrefslogtreecommitdiffstats
path: root/integration-test
diff options
context:
space:
mode:
authorseanbeirne <sean.beirne@est.tech>2024-09-03 15:27:28 +0100
committerseanbeirne <sean.beirne@est.tech>2024-10-25 15:46:44 +0100
commitccf48efa15fa6cce9d2e245601105043f939bcce (patch)
tree77a1a6a13f8de8a1e1d4d745e3becf1898ca0a31 /integration-test
parentde910dce42459035b24f3b1ff2f843152312518a (diff)
Support Alternate-Id for CPS-E05 id-searches and searchCmHandleIds
Issue-ID: CPS-2402 Issue-ID: CPS-2383 Change-Id: I5dd3132b70b401bf2f50f77c2c131d5d34aa0c0a Signed-off-by: seanbeirne <sean.beirne@est.tech>
Diffstat (limited to 'integration-test')
-rw-r--r--integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/RestApiSpec.groovy19
1 files changed, 12 insertions, 7 deletions
diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/RestApiSpec.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/RestApiSpec.groovy
index 1e1af556f1..179126c1a6 100644
--- a/integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/RestApiSpec.groovy
+++ b/integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/RestApiSpec.groovy
@@ -65,15 +65,20 @@ class RestApiSpec extends CpsIntegrationSpecBase {
]
}""".formatted(moduleName)
expect: "a search for module ${moduleName} returns expected CM handles"
- mvc.perform(post('/ncmp/v1/ch/id-searches').contentType(MediaType.APPLICATION_JSON).content(requestBodyWithModuleCondition))
+ mvc.perform(post('/ncmp/v1/ch/id-searches'+outputAlternateId).contentType(MediaType.APPLICATION_JSON).content(requestBodyWithModuleCondition))
.andExpect(status().is2xxSuccessful())
- .andExpect(jsonPath('$[*]', containsInAnyOrder(expectedCmHandles.toArray())))
- .andExpect(jsonPath('$', hasSize(expectedCmHandles.size())));
+ .andExpect(jsonPath('$[*]', containsInAnyOrder(expectedCmHandleReferences.toArray())))
+ .andExpect(jsonPath('$', hasSize(expectedCmHandleReferences.size())));
where:
- moduleName || expectedCmHandles
- 'M1' || ['ch-1', 'ch-2', 'ch-3']
- 'M2' || ['ch-1', 'ch-2']
- 'M3' || ['ch-3']
+ moduleName | outputAlternateId || expectedCmHandleReferences
+ 'M1' | '?outputAlternateId=false' || ['ch-1', 'ch-2', 'ch-3']
+ 'M2' | '?outputAlternateId=false' || ['ch-1', 'ch-2']
+ 'M3' | '?outputAlternateId=false' || ['ch-3']
+ 'M1' | '?outputAlternateId=true' || ['alt-1', 'alt-2', 'alt-3']
+ 'M2' | '?outputAlternateId=true' || ['alt-1', 'alt-2']
+ 'M3' | '?outputAlternateId=true' || ['alt-3']
+ 'M1' | '' || ['ch-1', 'ch-2', 'ch-3']
+
}
def 'Search for CM Handles using Cps Path Query.'() {