From abdff1bf331cc582d017cce9888828fa2e8f6260 Mon Sep 17 00:00:00 2001 From: tragait Date: Wed, 6 Oct 2021 11:04:18 +0100 Subject: fix fields and depth to option query Issue-ID: CPS-678 Signed-off-by: tragait Change-Id: I8934bd7708ae51dce77b8684081a71ca57bfa3a4 --- .../ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'cps-ncmp-rest/src/test/groovy/org/onap') 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 d62ae93b0..b8c68d913 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 @@ -193,7 +193,7 @@ class NetworkCmProxyControllerSpec extends Specification { def 'Get Resource Data from pass-through operational.' () { given: 'resource data url' def getUrl = "$ncmpBasePathV1/ch/testCmHandle/data/ds/ncmp-datastore:passthrough-operational" + - "?resourceIdentifier=parent/child&fields=testFields&depth=5" + "?resourceIdentifier=parent/child&options=(a=1,b=2)" when: 'get data resource request is performed' def response = mvc.perform( get(getUrl) @@ -204,8 +204,7 @@ class NetworkCmProxyControllerSpec extends Specification { 1 * mockNetworkCmProxyDataService.getResourceDataOperationalForCmHandle('testCmHandle', 'parent/child', 'application/json', - 'testFields', - 5) + '(a=1,b=2)') and: 'response status is Ok' response.status == HttpStatus.OK.value() } @@ -213,13 +212,12 @@ class NetworkCmProxyControllerSpec extends Specification { def 'Get Resource Data from pass-through running with #scenario value in resource identifier param.' () { given: 'resource data url' def getUrl = "$ncmpBasePathV1/ch/testCmHandle/data/ds/ncmp-datastore:passthrough-running" + - "?resourceIdentifier=" + resourceIdentifier + "&fields=testFields&depth=5" + "?resourceIdentifier=" + resourceIdentifier + "&options=(a=1,b=2)" and: 'ncmp service returns json object' mockNetworkCmProxyDataService.getResourceDataPassThroughRunningForCmHandle('testCmHandle', resourceIdentifier, 'application/json', - 'testFields', - 5) >> '{valid-json}' + '(a=1,b=2)') >> '{valid-json}' when: 'get data resource request is performed' def response = mvc.perform( get(getUrl) -- cgit 1.2.3-korg