X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-ncmp-service%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fncmp%2Fapi%2Fimpl%2Foperation%2FDmiOperationsSpec.groovy;h=44d4f0ce2717fb04d6bb792d94770efd7defe36b;hb=bc742a1dbe39a3269abab9e62a9d489f460144b0;hp=9405b663257983c2bd95b056d1bee44c037fb1d3;hpb=b33fcb39c094069cb3284ff037d486a4394647bc;p=cps.git 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 9405b66325..44d4f0ce27 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 @@ -118,4 +118,19 @@ class DmiOperationsSpec extends Specification { then: 'the post operation is executed with the correct URL and json data' 1 * mockDmiRestClient.postOperationWithJsonData(expectedUrl, requestBody, expectedHttpHeaders) } + + def 'Update resource data for pass-through:running datastore from DMI.'() { + given: 'the expected url' + def cmHandle = 'some-cmhandle' + def resourceIdentifier = 'parent/child' + def expectedUrl = 'some-dmi-service-name/dmi/v1/ch/' + cmHandle + '/data/ds' + + '/ncmp-datastore:passthrough-running?resourceIdentifier=' + resourceIdentifier + when: 'replace resource data is called for DMI' + objectUnderTest.updateResourceDataPassThroughRunningFromDmi('some-dmi-service-name', + cmHandle, + resourceIdentifier, + 'some-json-body') + then: 'the post operation is executed with the correct URL' + 1 * mockDmiRestClient.postOperationWithJsonData(expectedUrl, 'some-json-body', _ as HttpHeaders) + } } \ No newline at end of file