diff options
author | 2024-05-08 12:37:02 +0100 | |
---|---|---|
committer | 2024-05-20 17:10:41 +0100 | |
commit | 3cadc1985c5f8cdc3f1914b95fe43d5e0987743b (patch) | |
tree | a4aa14af70ab53fa6a200a4f951b29c86a063948 /src/test | |
parent | 91734f9782746feacd68effbe159c56c284beb83 (diff) |
CPS-2182 -#3 Include module Set Tag in dmi batch data enpoint
Change-Id: Ib45cc59c12062429aababa7aedb3a028aac0315c
Signed-off-by: david.mcweeney <david.mcweeney@est.tech>
Issue-ID: CPS-2182
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/groovy/org/onap/cps/ncmp/dmi/rest/controller/DmiRestControllerSpec.groovy | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/groovy/org/onap/cps/ncmp/dmi/rest/controller/DmiRestControllerSpec.groovy b/src/test/groovy/org/onap/cps/ncmp/dmi/rest/controller/DmiRestControllerSpec.groovy index 520e76af..23b039bd 100644 --- a/src/test/groovy/org/onap/cps/ncmp/dmi/rest/controller/DmiRestControllerSpec.groovy +++ b/src/test/groovy/org/onap/cps/ncmp/dmi/rest/controller/DmiRestControllerSpec.groovy @@ -384,13 +384,20 @@ class DmiRestControllerSpec extends Specification { def resourceDataUrl = "$basePathV1/data?topic=client-topic-name&requestId=some-requestId" and: 'list of operation details are received into request body' def dataOperationRequestBody = '[{"operation": "read", "operationId": "14", "datastore": "ncmp-datastore:passthrough-operational", "options": "some options", "resourceIdentifier": "some resourceIdentifier",' + - ' "cmhandles": [ {"id": "cmHanlde123", "cmHandleProperties": { "myProp`": "some value", "otherProp": "other value"}}]}]' + '"cmHandles": [ {"id": "cmHandle123", "moduleSetTag": "module-set-tag1", "cmHandleProperties": { "myProp`": "some value", "otherProp": "other value"}}]}]' when: 'the dmi resource data for dataOperation api is called.' def response = mvc.perform( post(resourceDataUrl).contentType(MediaType.APPLICATION_JSON).content(dataOperationRequestBody) ).andReturn().response then: 'the resource data operation endpoint returns the not implemented response' assert response.status == 501 + and: 'the job details are correctly received (logged)' + assert getLoggingMessage(1).contains('some-requestId') + assert getLoggingMessage(2).contains('client-topic-name') + assert getLoggingMessage(4).contains('some resourceIdentifier') + assert getLoggingMessage(5).contains('module-set-tag1') + and: 'the operation Id is correctly received (logged)' + assert getLoggingMessage(6).contains('14') } def getLoggingMessage(int index) { |