diff options
author | raviteja.karumuri <raviteja.karumuri@est.tech> | 2023-06-23 13:52:18 +0100 |
---|---|---|
committer | raviteja.karumuri <raviteja.karumuri@est.tech> | 2023-06-23 13:52:18 +0100 |
commit | 7090a07b05517e0a748cb82ffac8840de82c7fa5 (patch) | |
tree | c0c9c0d35bf49d19b1848418bb7f0e56c5e36ca1 /cps-ncmp-service/src/test | |
parent | 4992e60c1fca462d199799852fc4c93609d49e5a (diff) |
#2 NCMP : Replacing the word 'Batch' as 'DataOperation'.
Issue-ID: CPS-1754
Signed-off-by: raviteja.karumuri <raviteja.karumuri@est.tech>
Change-Id: Ib04e9d8a909e8868bf094e2625412996409b3a67
Diffstat (limited to 'cps-ncmp-service/src/test')
3 files changed, 5 insertions, 5 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiDataOperationsSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiDataOperationsSpec.groovy index be178e1276..c7ee4e0745 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiDataOperationsSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiDataOperationsSpec.groovy @@ -94,7 +94,7 @@ class DmiDataOperationsSpec extends DmiOperationsBaseSpec { def expectedDmiBatchResourceDataUrl = "ncmp/v1/data/topic=my-topic-name" def expectedBatchRequestAsJson = '[{"operation":"read","operationId":"operational-14","datastore":"ncmp-datastore:passthrough-operational","options":"some option","resourceIdentifier":"some resource identifier","cmHandles":[{"id":"some-cm-handle","cmHandleProperties":{"prop1":"val1"}}]}]' mockDmiRestClient.postOperationWithJsonData(expectedDmiBatchResourceDataUrl, _, READ.operationName) >> responseFromDmi - dmiServiceUrlBuilder.getBatchRequestUrl(_, _) >> expectedDmiBatchResourceDataUrl + dmiServiceUrlBuilder.getDataOperationRequestUrl(_, _) >> expectedDmiBatchResourceDataUrl when: 'get resource data for group of cm handles are invoked' objectUnderTest.requestResourceDataFromDmi('my-topic-name', dataOperationRequest, 'requestId') then: 'wait a little to allow execution of service method by task executor (on separate thread)' diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/utils/DataOperationRequestUtilsSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/utils/DataOperationRequestUtilsSpec.groovy index af3841a40b..334b455ef7 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/utils/DataOperationRequestUtilsSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/utils/DataOperationRequestUtilsSpec.groovy @@ -42,7 +42,7 @@ class DataOperationRequestUtilsSpec extends Specification { and: '4 known cm handles: ch1-dmi1, ch2-dmi1, ch3-dmi2, ch4-dmi2' def yangModelCmHandles = getYangModelCmHandles() when: 'data operation request is processed' - def operationsOutPerDmiServiceName = ResourceDataBatchRequestUtils.processPerOperationInBatchRequest(dataOperationRequest, yangModelCmHandles) + def operationsOutPerDmiServiceName = ResourceDataOperationRequestUtils.processPerDefinitionInDataOperationsRequest(dataOperationRequest, yangModelCmHandles) and: 'converted to a json node' def dmiDataOperationRequestBody = jsonObjectMapper.asJsonString(operationsOutPerDmiServiceName.get(serviceName)) def dmiDataOperationRequestBodyAsJsonNode = jsonObjectMapper.convertToJsonNode(dmiDataOperationRequestBody).get(operationIndex) diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/utils/DmiServiceUrlBuilderSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/utils/DmiServiceUrlBuilderSpec.groovy index b1a8e85e2d..6c4575515f 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/utils/DmiServiceUrlBuilderSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/utils/DmiServiceUrlBuilderSpec.groovy @@ -81,15 +81,15 @@ class DmiServiceUrlBuilderSpec extends Specification { given: 'the required path parameters' def batchRequestUriVariables = [dmiServiceName: 'some-service', dmiBasePath: 'testBase', cmHandleId: '123'] and: 'the relevant query parameters' - def batchRequestQueryParams = objectUnderTest.getBatchRequestQueryParams('some topic', 'some id') + def batchRequestQueryParams = objectUnderTest.getDataOperationRequestQueryParams('some topic', 'some id') when: 'a URL is created' - def result = objectUnderTest.getBatchRequestUrl(batchRequestQueryParams, batchRequestUriVariables) + def result = objectUnderTest.getDataOperationRequestUrl(batchRequestQueryParams, batchRequestUriVariables) then: 'it is formed correctly' assert result.toString() == 'some-service/testBase/v1/data?topic=some topic&requestId=some id' } def 'Populate batch uri variables.'() { expect: 'Populate batch uri variables returns a map with given service name and base path from setup' - assert objectUnderTest.populateBatchUriVariables('some service') == [ dmiServiceName: 'some service',dmiBasePath: 'dmi' ] + assert objectUnderTest.populateDataOperationRequestUriVariables('some service') == [dmiServiceName: 'some service', dmiBasePath: 'dmi' ] } } |