diff options
author | Alex <alexander.borovitzky@guest.telecomitalia.it> | 2021-09-05 19:15:58 +0300 |
---|---|---|
committer | Alex <alexander.borovitzky@guest.telecomitalia.it> | 2021-09-14 16:14:53 +0300 |
commit | a640faf880d7cd094e25576548f988952e08dbfc (patch) | |
tree | 2584f2efd6bb1697efcc53f0f512f07b6281aefd /bpmn/so-bpmn-infrastructure-common/src/test | |
parent | 808be6bca9c86c4857b0f3cb08675cbbdb1aaaaf (diff) |
Wrong additional parameter for OOF's terminateNxiRequest
Issue-ID: SO-3760
Change-Id: If4211e67ae2debcf394fd69c7e301a99d3bb9658
Signed-off-by: Alex <alexander.borovitzky@guest.telecomitalia.it>
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/test')
-rw-r--r-- | bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSITest.groovy | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSITest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSITest.groovy index 5bf4f40e50..acace8c1c7 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSITest.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateCoreNSSITest.groovy @@ -95,6 +95,9 @@ class DoDeallocateCoreNSSITest extends MsoGroovyTest { String nssiId = "5G-999" currentNSSI.put("nssiId", nssiId) + String nsiId = "ns-777" + currentNSSI.put("nsiId", nsiId) + when(mockExecution.getVariable("currentNSSI")).thenReturn(currentNSSI) when(mockExecution.getVariable("mso.oof.endpoint")).thenReturn("http://oof.onap:8088") @@ -127,6 +130,14 @@ class DoDeallocateCoreNSSITest extends MsoGroovyTest { when(client.get(ServiceInstance.class, nssiUri)).thenReturn(nssiOpt) + AAIResourceUri nsiUri = AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(nsiId)) + + ServiceInstance nsi = new ServiceInstance() + nsi.setServiceInstanceId("5G-777") + Optional<ServiceInstance> nsiOpt = Optional.of(nsi) + + when(client.get(ServiceInstance.class, nsiUri)).thenReturn(nsiOpt) + String urlString = "http://oof.onap:8088" String httpRequest = "{\n" + @@ -143,7 +154,7 @@ class DoDeallocateCoreNSSITest extends MsoGroovyTest { String nxlId = nssi.getServiceInstanceId() String nxlType = "NSSI" String messageType = "cn" - String serviceInstanceId = nssi.getServiceInstanceId() + String serviceInstanceId = nsi.getServiceInstanceId() when(mockExecution.getVariable("msoRequestId")).thenReturn(requestId) when(oofUtilsMock.buildTerminateNxiRequest(requestId, nxlId, nxlType, messageType, serviceInstanceId)).thenReturn(httpRequest) @@ -213,6 +224,7 @@ class DoDeallocateCoreNSSITest extends MsoGroovyTest { genericVnf.setVnfName("vnf-name") genericVnf.setVnfId("vnf-id") + currentNSSI.put("constituteVnf", genericVnf) String urlString = String.format("http://mso.onap:8088/serviceInstantiation/v7/serviceInstances/%s/vnfs/%s", networkServiceInstance.getServiceInstanceId(), genericVnf.getVnfId()) @@ -235,7 +247,7 @@ class DoDeallocateCoreNSSITest extends MsoGroovyTest { when(httpClientFactoryMock.newJsonClient(any(), any())).thenReturn(httpClientMock) - when(httpClientMock.delete()).thenReturn(responseMock) + when(httpClientMock.delete(requestDetailsStr)).thenReturn(responseMock) when(responseMock.getStatus()).thenReturn(200) when(responseMock.hasEntity()).thenReturn(true) |