summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/src/test/groovy/org/onap
diff options
context:
space:
mode:
authorniamhcore <niamh.core@est.tech>2021-11-10 12:13:51 +0000
committerniamhcore <niamh.core@est.tech>2021-11-10 12:28:40 +0000
commit9e09fe868b39fd5f13092a923da3474deb0f75b9 (patch)
treebf51a92447c0061a48bf0dba1bc7b1cd7e437435 /cps-ncmp-rest/src/test/groovy/org/onap
parent7a9e0f81770f2aa2793e241cee3a3c6c9bb40d9d (diff)
Fix for get cm handle identifiers response body
Issue-ID: CPS-636 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I35dabf8e5839c56a9ae1851495cc9bf15e633c21
Diffstat (limited to 'cps-ncmp-rest/src/test/groovy/org/onap')
-rw-r--r--cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy8
1 files changed, 4 insertions, 4 deletions
diff --git a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy
index 4066fd35eb..cca62b9ec0 100644
--- a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy
+++ b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy
@@ -258,8 +258,8 @@ class NetworkCmProxyControllerSpec extends Specification {
given: 'an endpoint and json data'
def searchesEndpoint = "$ncmpBasePathV1/ch/searches"
String jsonData = TestUtils.getResourceFileContent('cmhandle-search.json')
- and: 'the service method is invoked with module names and returns a cm handle id'
- mockNetworkCmProxyDataService.executeCmHandleHasAllModulesSearch(['module1', 'module2']) >> ['some-cmhandle-id']
+ and: 'the service method is invoked with module names and returns two cm handle ids'
+ mockNetworkCmProxyDataService.executeCmHandleHasAllModulesSearch(['module1', 'module2']) >> ['some-cmhandle-id1', 'some-cmhandle-id2']
when: 'the searches api is invoked'
def response = mvc.perform(post(searchesEndpoint)
.contentType(MediaType.APPLICATION_JSON)
@@ -267,7 +267,7 @@ class NetworkCmProxyControllerSpec extends Specification {
then: 'response status returns OK'
response.status == HttpStatus.OK.value()
and: 'the expected response content is returned'
- response.contentAsString == '{"cmHandles":[{"cmHandleId":"some-cmhandle-id"}]}'
+ response.contentAsString == '{"cmHandles":[{"cmHandleId":"some-cmhandle-id1"},{"cmHandleId":"some-cmhandle-id2"}]}'
}
def 'Call execute cm handle searches with unrecognized condition name.'() {
@@ -279,7 +279,7 @@ class NetworkCmProxyControllerSpec extends Specification {
.contentType(MediaType.APPLICATION_JSON)
.content(jsonData)).andReturn().response
then: 'an empty cm handle identifier is returned'
- response.contentAsString == '{"cmHandles":null}'
+ response.contentAsString == '{"cmHandles":[]}'
}
def 'Update resource data in passthrough-running datastore.' () {