From ccf48efa15fa6cce9d2e245601105043f939bcce Mon Sep 17 00:00:00 2001 From: seanbeirne Date: Tue, 3 Sep 2024 15:27:28 +0100 Subject: 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 --- .../integration/functional/ncmp/RestApiSpec.groovy | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'integration-test') 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.'() { -- cgit 1.2.3-korg