diff options
author | Daniel Hanrahan <daniel.hanrahan@est.tech> | 2024-10-29 10:06:43 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2024-10-29 10:06:43 +0000 |
commit | 44498392f9d74510247de52de7a75f3e144c6b2c (patch) | |
tree | 0e6e6d94282798e04a821bb7647a4629d03d12e9 /integration-test | |
parent | eefb5b3de6e35615ac010805ba4b2e54ec6c5f11 (diff) | |
parent | ccf48efa15fa6cce9d2e245601105043f939bcce (diff) |
Merge "Support Alternate-Id for CPS-E05 id-searches and searchCmHandleIds"
Diffstat (limited to 'integration-test')
-rw-r--r-- | integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/RestApiSpec.groovy | 19 |
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 265562880e..7ce3cf5e17 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 @@ -67,15 +67,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.'() { |