summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/test/groovy
diff options
context:
space:
mode:
authorniamhcore <niamh.core@est.tech>2021-09-29 16:43:35 +0100
committerniamhcore <niamh.core@est.tech>2021-10-06 10:03:15 +0100
commitfd2e6ddde2c2260951e2dfd5e3fd7f4bd04976e1 (patch)
tree1ba737d69631d3ab620c90e99964b68d72fd1317 /cps-ncmp-service/src/test/groovy
parentfdcb36fa9db642df3c47637d32f4e7ac5dd347e8 (diff)
Changing resource identifier to a query param
*Update dmi operations to build dmi url using query param Issue-ID: CPS-679 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I2292507c5057837932f8e21f1a8e80721066b336
Diffstat (limited to 'cps-ncmp-service/src/test/groovy')
-rw-r--r--cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operation/DmiOperationsSpec.groovy12
1 files changed, 6 insertions, 6 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operation/DmiOperationsSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operation/DmiOperationsSpec.groovy
index 6a1ce1a18b..8af778106a 100644
--- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operation/DmiOperationsSpec.groovy
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operation/DmiOperationsSpec.groovy
@@ -42,11 +42,11 @@ class DmiOperationsSpec extends Specification {
def 'call get resource data for pass-through:operational datastore from DMI.'() {
given: 'expected url'
def expectedUrl = 'testDmiBasePath/dmi/v1/ch/testCmhandle/data/ds' +
- '/ncmp-datastore:passthrough-operational/testResourceId?fields=testFieldsQuery&depth=10'
+ '/ncmp-datastore:passthrough-operational?resourceIdentifier=parent/child&fields=testFieldsQuery&depth=10'
when: 'get resource data is called to DMI'
objectUnderTest.getResourceDataOperationalFromDmi('testDmiBasePath',
'testCmhandle',
- 'testResourceId',
+ 'parent/child',
'testFieldsQuery',
10,
'testAcceptJson',
@@ -57,11 +57,11 @@ class DmiOperationsSpec extends Specification {
def 'call get resource data for pass-through:running datastore from DMI.'() {
given: 'expected url'
def expectedUrl = 'testDmiBasePath/dmi/v1/ch/testCmhandle/data/ds' +
- '/ncmp-datastore:passthrough-running/testResourceId?fields=testFieldsQuery&depth=10'
+ '/ncmp-datastore:passthrough-running?resourceIdentifier=parent/child&fields=testFieldsQuery&depth=10'
when: 'get resource data is called to DMI'
objectUnderTest.getResourceDataPassThroughRunningFromDmi('testDmiBasePath',
'testCmhandle',
- 'testResourceId',
+ 'parent/child',
'testFieldsQuery',
10,
'testAcceptJson',
@@ -72,11 +72,11 @@ class DmiOperationsSpec extends Specification {
def 'call create resource data for pass-through:running datastore from DMI.'() {
given: 'expected url'
def expectedUrl = 'testDmiBasePath/dmi/v1/ch/testCmhandle/data/ds' +
- '/ncmp-datastore:passthrough-running/testResourceId'
+ '/ncmp-datastore:passthrough-running?resourceIdentifier=parent/child'
when: 'get resource data is called to DMI'
objectUnderTest.createResourceDataPassThroughRunningFromDmi('testDmiBasePath',
'testCmhandle',
- 'testResourceId',
+ 'parent/child',
'testJsonbody')
then: 'the put operation is executed with the correct URL'
1 * mockDmiRestClient.postOperationWithJsonData(expectedUrl, 'testJsonbody', _ as HttpHeaders)