summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/src/test/groovy/org
diff options
context:
space:
mode:
authorNiamh Core <niamh.core@est.tech>2021-08-20 10:38:54 +0000
committerGerrit Code Review <gerrit@onap.org>2021-08-20 10:38:54 +0000
commitdc5ed75c841da857611713bceed8bf9988204d3d (patch)
tree1200bc43049a530dd7dff9fdc647319282729361 /cps-ncmp-rest/src/test/groovy/org
parentffc05ea4b84ee3ca36c2278a4d4ded9f8e0371d1 (diff)
parentc328551bdfd069343cc4c4e0249516d07938c78a (diff)
Merge "get resource data for operational passthrough"
Diffstat (limited to 'cps-ncmp-rest/src/test/groovy/org')
-rw-r--r--cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy20
1 files changed, 20 insertions, 0 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 f537980ac8..b2a060c278 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
@@ -196,5 +196,25 @@ class NetworkCmProxyControllerSpec extends Specification {
response.status == HttpStatus.CREATED.value()
}
+ def 'Get Resource Data from pass-through operational.' () {
+ given: 'resource data url'
+ def getUrl = "$basePath/v1/ch/testCmHandle/data/ds/ncmp-datastore:passthrough-operational" +
+ "/testResourceIdentifier?fields=testFields&depth=5"
+ when: 'get data resource request is performed'
+ def response = mvc.perform(
+ get(getUrl)
+ .contentType(MediaType.APPLICATION_JSON)
+ .accept(MediaType.APPLICATION_JSON_VALUE)
+ ).andReturn().response
+ then: 'the NCMP data service is called with getResourceDataOperationalFoCmHandle'
+ 1 * mockNetworkCmProxyDataService.getResourceDataOperationalFoCmHandle('testCmHandle',
+ 'testResourceIdentifier',
+ 'application/json',
+ 'testFields',
+ 5)
+ and: 'response status is Ok'
+ response.status == HttpStatus.OK.value()
+ }
+
}