aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/mso-infrastructure-bpmn/src
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-03-20 14:12:06 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-01 09:45:03 -0400
commitaaa93d4351b712762d6951a8c82bbe84c2077795 (patch)
tree69dab8e5203fe3aa6afb0a26b4da101213a3bf9f /bpmn/mso-infrastructure-bpmn/src
parent24117e55159518d2e3599fd7cf6705d476cfda81 (diff)
replace all fixed wiremock ports
trying to get the tests that can be threaded to pass started to remove fixed port references Change-Id: I7bfe067a8f36c908039700646571681321e9a6f5 Issue-ID: SO-1676 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/mso-infrastructure-bpmn/src')
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/BaseIntegrationTest.java6
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CompleteMsoProcessIT.java2
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupNameIT.java6
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupTenantIT.java4
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleIT.java66
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java10
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DecomposeServiceIT.java4
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DeleteAAIVfModuleIT.java56
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/FalloutHandlerIT.java5
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenerateVfModuleNameIT.java2
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ManualHandlingIT.java2
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteGenericVnf.java9
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteVfModule.java17
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIGenericVnfSearch.java33
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingIT.java18
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java18
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java16
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/RainyDayHandlerIT.java2
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java3
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java18
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java16
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java14
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java10
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/CreateVcpeResCustServiceIT.java205
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DeleteVcpeResCustServiceIT.java82
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGIT.java84
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGRollbackIT.java76
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCIT.java82
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCRollbackIT.java76
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceBRGIT.java36
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceTXCIT.java36
31 files changed, 505 insertions, 509 deletions
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/BaseIntegrationTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/BaseIntegrationTest.java
index b5511f67e3..fc21ff905d 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/BaseIntegrationTest.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/BaseIntegrationTest.java
@@ -32,6 +32,7 @@ import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;
+import com.github.tomakehurst.wiremock.WireMockServer;
import com.github.tomakehurst.wiremock.client.WireMock;
@RunWith(SpringRunner.class)
@@ -46,9 +47,12 @@ public abstract class BaseIntegrationTest extends WorkflowTest {
@Value("${wiremock.server.port}")
protected String wiremockPort;
+ @Autowired
+ protected WireMockServer wireMockServer;
+
@After
public void baseAfterTest() {
- WireMock.reset();
+ wireMockServer.resetAll();
}
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CompleteMsoProcessIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CompleteMsoProcessIT.java
index 470cc2220d..f528205d17 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CompleteMsoProcessIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CompleteMsoProcessIT.java
@@ -38,7 +38,7 @@ import org.onap.so.BaseIntegrationTest;
public class CompleteMsoProcessIT extends BaseIntegrationTest {
private void executeFlow(String inputRequestFile) throws InterruptedException {
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
Map<String, Object> variables = new HashMap<>();
variables.put("CompleteMsoProcessRequest",inputRequestFile);
variables.put("mso-request-id", UUID.randomUUID().toString());
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupNameIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupNameIT.java
index 0ef856bb9d..cc3ca941e4 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupNameIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupNameIT.java
@@ -46,7 +46,7 @@ public class ConfirmVolumeGroupNameIT extends BaseIntegrationTest {
@Test
public void sunnyDay() throws Exception {
logStart();
- MockGetVolumeGroupById("MDTWNJ21", "VOLUME_GROUP_ID_1", "aai-volume-group-id-info.xml");
+ MockGetVolumeGroupById(wireMockServer, "MDTWNJ21", "VOLUME_GROUP_ID_1", "aai-volume-group-id-info.xml");
Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
@@ -72,7 +72,7 @@ public class ConfirmVolumeGroupNameIT extends BaseIntegrationTest {
logStart();
// does not exist would return a 404 from AAI
- MockGetVolumeGroupById("MDTWNJ21", "VOLUME_GROUP_ID_THAT_DOES_NOT_EXIST", "aai-volume-group-id-info.xml", 404);
+ MockGetVolumeGroupById(wireMockServer, "MDTWNJ21", "VOLUME_GROUP_ID_THAT_DOES_NOT_EXIST", "aai-volume-group-id-info.xml", 404);
Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
@@ -98,7 +98,7 @@ public class ConfirmVolumeGroupNameIT extends BaseIntegrationTest {
public void rainyDayNameDoesNotMatch() throws Exception {
logStart();
- MockGetVolumeGroupById("MDTWNJ21", "VOLUME_GROUP_ID_1", "aai-volume-group-id-info.xml", 200);
+ MockGetVolumeGroupById(wireMockServer, "MDTWNJ21", "VOLUME_GROUP_ID_1", "aai-volume-group-id-info.xml", 200);
Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupTenantIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupTenantIT.java
index af9ab7d3e4..fd1f7c1a2b 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupTenantIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ConfirmVolumeGroupTenantIT.java
@@ -42,7 +42,7 @@ public class ConfirmVolumeGroupTenantIT extends BaseIntegrationTest {
@Test
public void testRemoveLayer3Service_success() throws Exception{
- MockGetVolumeGroupById("MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume.xml");
+ MockGetVolumeGroupById(wireMockServer, "MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume.xml");
Map<String, Object> variables = new HashMap<>();
setVariables(variables);
@@ -60,7 +60,7 @@ public class ConfirmVolumeGroupTenantIT extends BaseIntegrationTest {
@Test
public void testRemoveLayer3Service_idsNotMatch() throws Exception{
- MockGetVolumeGroupById("MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume_idsNotMatch.xml");
+ MockGetVolumeGroupById(wireMockServer, "MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume_idsNotMatch.xml");
Map<String, Object> variables = new HashMap<>();
setVariables(variables);
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleIT.java
index f6284f3535..f6cd74a55b 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleIT.java
@@ -25,10 +25,8 @@ package org.onap.so.bpmn.common;
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.containing;
import static com.github.tomakehurst.wiremock.client.WireMock.put;
-import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
-
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
@@ -40,6 +38,8 @@ import org.onap.so.bpmn.core.WorkflowException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.github.tomakehurst.wiremock.WireMockServer;
+
/**
* Unit test for CreateAAIVfModule.bpmn.
*/
@@ -51,9 +51,9 @@ public class CreateAAIVfModuleIT extends BaseIntegrationTest {
@Test
public void TestCreateGenericVnfSuccess_200() {
- new MockAAIGenericVnfSearch();
- MockAAICreateGenericVnf();
- MockAAIVfModulePUT(true);
+ new MockAAIGenericVnfSearch(wireMockServer);
+ MockAAICreateGenericVnf(wireMockServer);
+ MockAAIVfModulePUT(wireMockServer, true);
Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", UUID.randomUUID().toString());
@@ -76,9 +76,9 @@ public class CreateAAIVfModuleIT extends BaseIntegrationTest {
@Test
public void TestCreateVfModuleSuccess_200() {
// create Add-on VF Module for existing Generic VNF
- new MockAAIGenericVnfSearch();
- MockAAICreateGenericVnf();
- MockAAIVfModulePUT(true);
+ new MockAAIGenericVnfSearch(wireMockServer);
+ MockAAICreateGenericVnf(wireMockServer);
+ MockAAIVfModulePUT(wireMockServer, true);
Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", UUID.randomUUID().toString());
variables.put("isDebugLogEnabled","true");
@@ -98,9 +98,9 @@ public class CreateAAIVfModuleIT extends BaseIntegrationTest {
@Test
public void TestQueryGenericVnfFailure_5000() {
- new MockAAIGenericVnfSearch();
- MockAAICreateGenericVnf();
- MockAAIVfModulePUT(true);
+ new MockAAIGenericVnfSearch(wireMockServer);
+ MockAAICreateGenericVnf(wireMockServer);
+ MockAAIVfModulePUT(wireMockServer, true);
Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", UUID.randomUUID().toString());
@@ -121,9 +121,9 @@ public class CreateAAIVfModuleIT extends BaseIntegrationTest {
@Test
public void TestCreateDupGenericVnfFailure_1002() {
- new MockAAIGenericVnfSearch();
- MockAAICreateGenericVnf();
- MockAAIVfModulePUT(true);
+ new MockAAIGenericVnfSearch(wireMockServer);
+ MockAAICreateGenericVnf(wireMockServer);
+ MockAAIVfModulePUT(wireMockServer, true);
Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", UUID.randomUUID().toString());
@@ -144,9 +144,9 @@ public class CreateAAIVfModuleIT extends BaseIntegrationTest {
@Test
public void TestCreateDupVfModuleFailure_1002() {
- new MockAAIGenericVnfSearch();
- MockAAICreateGenericVnf();
- MockAAIVfModulePUT(true);
+ new MockAAIGenericVnfSearch(wireMockServer);
+ MockAAICreateGenericVnf(wireMockServer);
+ MockAAIVfModulePUT(wireMockServer, true);
Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", UUID.randomUUID().toString());
@@ -167,9 +167,9 @@ public class CreateAAIVfModuleIT extends BaseIntegrationTest {
@Test
public void TestCreateGenericVnfFailure_5000() {
- new MockAAIGenericVnfSearch();
- MockAAICreateGenericVnf();
- MockAAIVfModulePUT(true);
+ new MockAAIGenericVnfSearch(wireMockServer);
+ MockAAICreateGenericVnf(wireMockServer);
+ MockAAIVfModulePUT(wireMockServer, true);
Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", UUID.randomUUID().toString());
@@ -190,9 +190,9 @@ public class CreateAAIVfModuleIT extends BaseIntegrationTest {
@Test
public void TestCreateGenericVnfFailure_1002() {
- new MockAAIGenericVnfSearch();
- MockAAICreateGenericVnf();
- MockAAIVfModulePUT(true);
+ new MockAAIGenericVnfSearch(wireMockServer);
+ MockAAICreateGenericVnf(wireMockServer);
+ MockAAIVfModulePUT(wireMockServer, true);
Map<String, Object> variables = new HashMap<>();
variables.put("mso-request-id", UUID.randomUUID().toString());
@@ -213,9 +213,9 @@ public class CreateAAIVfModuleIT extends BaseIntegrationTest {
@Test
public void TestCreateVfModuleFailure_5000() {
- new MockAAIGenericVnfSearch();
- MockAAICreateGenericVnf();
- MockAAIVfModulePUT(true);
+ new MockAAIGenericVnfSearch(wireMockServer);
+ MockAAICreateGenericVnf(wireMockServer);
+ MockAAIVfModulePUT(wireMockServer, true);
Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
@@ -234,12 +234,12 @@ public class CreateAAIVfModuleIT extends BaseIntegrationTest {
logger.debug(exception.getErrorMessage());
}
- public static void MockAAICreateGenericVnf(){
- stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*"))
+ public static void MockAAICreateGenericVnf(WireMockServer wireMockServer){
+ wireMockServer.stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*"))
.withRequestBody(containing("<service-id>00000000-0000-0000-0000-000000000000</service-id>"))
.willReturn(aResponse()
.withStatus(201)));
- stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*"))
+ wireMockServer.stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*"))
.withRequestBody(containing("<service-id>99999999-9999-9999-9999-999999999999</service-id>"))
.willReturn(aResponse()
.withStatus(500)
@@ -248,18 +248,18 @@ public class CreateAAIVfModuleIT extends BaseIntegrationTest {
}
// start of mocks used locally and by other VF Module unit tests
- public static void MockAAIVfModulePUT(boolean isCreate){
- stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
+ public static void MockAAIVfModulePUT(WireMockServer wireMockServer, boolean isCreate){
+ wireMockServer.stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
.withRequestBody(containing("MMSC"))
.willReturn(aResponse()
.withStatus(isCreate ? 201 : 200)));
- stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
+ wireMockServer.stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*/vf-modules/vf-module/.*"))
.withRequestBody(containing("PCRF"))
.willReturn(aResponse()
.withStatus(500)
.withHeader("Content-Type", "text/xml")
.withBodyFile("aaiFault.xml")));
- stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721"))
+ wireMockServer.stubFor(put(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721"))
.willReturn(aResponse()
.withStatus(200)));
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java
index f72ca79dc6..39a7e0c74b 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/CreateAAIVfModuleVolumeGroupIT.java
@@ -56,8 +56,8 @@ public class CreateAAIVfModuleVolumeGroupIT extends BaseIntegrationTest {
logStart();
String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/CreateAAIVfModuleVolumeGroupRequest.xml");
- MockGetGenericVnfByIdWithPriority("skask", "lukewarm", 200, "VfModularity/VfModule-lukewarm.xml", 2);
- MockPutVfModuleIdNoResponse("skask", "PCRF", "lukewarm");
+ MockGetGenericVnfByIdWithPriority(wireMockServer, "skask", "lukewarm", 200, "VfModularity/VfModule-lukewarm.xml", 2);
+ MockPutVfModuleIdNoResponse(wireMockServer, "skask", "PCRF", "lukewarm");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -85,7 +85,7 @@ public class CreateAAIVfModuleVolumeGroupIT extends BaseIntegrationTest {
logStart();
String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/CreateAAIVfModuleVolumeGroupRequest.xml");
- MockGetVfModuleId("skask", ".*", "VfModularity/VfModule-supercool.xml", 404);
+ MockGetVfModuleId(wireMockServer, "skask", ".*", "VfModularity/VfModule-supercool.xml", 404);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -112,8 +112,8 @@ public class CreateAAIVfModuleVolumeGroupIT extends BaseIntegrationTest {
logStart();
String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/CreateAAIVfModuleVolumeGroupRequest.xml");
- MockGetVfModuleId("skask", "lukewarm", "VfModularity/VfModule-lukewarm.xml", 200);
- MockPutVfModuleId("skask", "lukewarm", 404);
+ MockGetVfModuleId(wireMockServer, "skask", "lukewarm", "VfModularity/VfModule-lukewarm.xml", 200);
+ MockPutVfModuleId(wireMockServer, "skask", "lukewarm", 404);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DecomposeServiceIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DecomposeServiceIT.java
index 7acaf449e3..3d15a4b29b 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DecomposeServiceIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DecomposeServiceIT.java
@@ -46,7 +46,7 @@ public class DecomposeServiceIT extends BaseIntegrationTest {
@Test
public void testDecomposeService_success() throws Exception{
- MockGetServiceResourcesCatalogData("cmw-123-456-789", "1.0", "/getCatalogServiceResourcesDataWithConfig.json");
+ MockGetServiceResourcesCatalogData(wireMockServer, "cmw-123-456-789", "1.0", "/getCatalogServiceResourcesDataWithConfig.json");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -62,7 +62,7 @@ public class DecomposeServiceIT extends BaseIntegrationTest {
//@Test
@Test
public void testDecomposeService_success_partial() throws Exception{
- MockGetServiceResourcesCatalogData("cmw-123-456-789", "1.0", "/getCatalogServiceResourcesDataNoNetwork.json");
+ MockGetServiceResourcesCatalogData(wireMockServer, "cmw-123-456-789", "1.0", "/getCatalogServiceResourcesDataNoNetwork.json");
String businessKey = UUID.randomUUID().toString();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DeleteAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DeleteAAIVfModuleIT.java
index f98e4477aa..99e4b8cbde 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DeleteAAIVfModuleIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/DeleteAAIVfModuleIT.java
@@ -20,18 +20,10 @@
package org.onap.so.bpmn.common;
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
-import static com.github.tomakehurst.wiremock.client.WireMock.delete;
-import static com.github.tomakehurst.wiremock.client.WireMock.get;
-import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
-
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
-import org.camunda.bpm.engine.RuntimeService;
-import org.camunda.bpm.engine.test.Deployment;
import org.junit.Assert;
import org.junit.Test;
import org.onap.so.BaseIntegrationTest;
@@ -52,9 +44,9 @@ public class DeleteAAIVfModuleIT extends BaseIntegrationTest {
public void TestDeleteGenericVnfSuccess_200() {
// delete the Base Module and Generic Vnf
// vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c721, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a73
- new MockAAIGenericVnfSearch();
- new MockAAIDeleteGenericVnf();
- new MockAAIDeleteVfModule();
+ new MockAAIGenericVnfSearch(wireMockServer);
+ new MockAAIDeleteGenericVnf(wireMockServer);
+ new MockAAIDeleteVfModule(wireMockServer);
Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
@@ -86,9 +78,9 @@ public class DeleteAAIVfModuleIT extends BaseIntegrationTest {
" <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
"</vnf-request>" + EOL;
- new MockAAIGenericVnfSearch();
- new MockAAIDeleteGenericVnf();
- new MockAAIDeleteVfModule();
+ new MockAAIGenericVnfSearch(wireMockServer);
+ new MockAAIDeleteGenericVnf(wireMockServer);
+ new MockAAIDeleteVfModule(wireMockServer);
Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
@@ -119,9 +111,9 @@ public class DeleteAAIVfModuleIT extends BaseIntegrationTest {
" </vnf-inputs>" + EOL +
" <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
"</vnf-request>" + EOL;
- new MockAAIGenericVnfSearch();
- new MockAAIDeleteGenericVnf();
- new MockAAIDeleteVfModule();
+ new MockAAIGenericVnfSearch(wireMockServer);
+ new MockAAIDeleteGenericVnf(wireMockServer);
+ new MockAAIDeleteVfModule(wireMockServer);
Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
@@ -152,9 +144,9 @@ public class DeleteAAIVfModuleIT extends BaseIntegrationTest {
" </vnf-inputs>" + EOL +
" <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
"</vnf-request>" + EOL;
- new MockAAIGenericVnfSearch();
- new MockAAIDeleteGenericVnf();
- new MockAAIDeleteVfModule();
+ new MockAAIGenericVnfSearch(wireMockServer);
+ new MockAAIDeleteGenericVnf(wireMockServer);
+ new MockAAIDeleteVfModule(wireMockServer);
Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
@@ -185,9 +177,9 @@ public class DeleteAAIVfModuleIT extends BaseIntegrationTest {
" </vnf-inputs>" + EOL +
" <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
"</vnf-request>" + EOL;
- new MockAAIGenericVnfSearch();
- new MockAAIDeleteGenericVnf();
- new MockAAIDeleteVfModule();
+ new MockAAIGenericVnfSearch(wireMockServer);
+ new MockAAIDeleteGenericVnf(wireMockServer);
+ new MockAAIDeleteVfModule(wireMockServer);
Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
@@ -218,9 +210,9 @@ public class DeleteAAIVfModuleIT extends BaseIntegrationTest {
" </vnf-inputs>" + EOL +
" <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
"</vnf-request>" + EOL;
- new MockAAIGenericVnfSearch();
- new MockAAIDeleteGenericVnf();
- new MockAAIDeleteVfModule();
+ new MockAAIGenericVnfSearch(wireMockServer);
+ new MockAAIDeleteGenericVnf(wireMockServer);
+ new MockAAIDeleteVfModule(wireMockServer);
Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
@@ -251,9 +243,9 @@ public class DeleteAAIVfModuleIT extends BaseIntegrationTest {
" </vnf-inputs>" + EOL +
" <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/>" + EOL +
"</vnf-request>" + EOL;
- new MockAAIGenericVnfSearch();
- new MockAAIDeleteGenericVnf();
- new MockAAIDeleteVfModule();
+ new MockAAIGenericVnfSearch(wireMockServer);
+ new MockAAIDeleteGenericVnf(wireMockServer);
+ new MockAAIDeleteVfModule(wireMockServer);
Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
@@ -270,9 +262,9 @@ public class DeleteAAIVfModuleIT extends BaseIntegrationTest {
public void TestDeleteVfModuleFailure_1002_2() {
// failure attempting to delete a Vf Module that does not exist (A&AI returns 404)
// vnf-id=a27ce5a9-29c4-4c22-a017-6615ac73c720, vf-module-id=973ed047-d251-4fb9-bf1a-65b8949e0a76
- new MockAAIGenericVnfSearch();
- new MockAAIDeleteGenericVnf();
- new MockAAIDeleteVfModule();
+ new MockAAIGenericVnfSearch(wireMockServer);
+ new MockAAIDeleteGenericVnf(wireMockServer);
+ new MockAAIDeleteVfModule(wireMockServer);
Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/FalloutHandlerIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/FalloutHandlerIT.java
index f477926f99..88f8e5deb7 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/FalloutHandlerIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/FalloutHandlerIT.java
@@ -24,7 +24,6 @@ package org.onap.so.bpmn.common;
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.post;
-import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
import static org.onap.so.bpmn.common.BPMNUtil.waitForWorkflowToFinish;
@@ -48,12 +47,12 @@ public class FalloutHandlerIT extends BaseIntegrationTest {
private void setupMocks() {
- stubFor(post(urlEqualTo("/dbadapters/AttRequestsDbAdapter"))
+ wireMockServer.stubFor(post(urlEqualTo("/dbadapters/AttRequestsDbAdapter"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "text/xml")
.withBody("<DbTag>Notified</DbTag>")));
- stubFor(post(urlEqualTo("/dbadapters/RequestsDbAdapter"))
+ wireMockServer.stubFor(post(urlEqualTo("/dbadapters/RequestsDbAdapter"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "text/xml")
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenerateVfModuleNameIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenerateVfModuleNameIT.java
index fa8823a5b4..7299e0602e 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenerateVfModuleNameIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/GenerateVfModuleNameIT.java
@@ -61,7 +61,7 @@ public class GenerateVfModuleNameIT extends BaseIntegrationTest {
" <vnf-params xmlns:tns=\"http://ecomp.att.com/mso/infra/vnf-request/v1\"/>" + EOL +
"</vnf-request>" + EOL;
- MockGetGenericVnfById(".*", "GenericFlows/getGenericVnfByNameResponse.xml");
+ MockGetGenericVnfById(wireMockServer, ".*", "GenericFlows/getGenericVnfByNameResponse.xml");
RuntimeService runtimeService = processEngine.getRuntimeService();
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("isDebugLogEnabled","true");
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ManualHandlingIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ManualHandlingIT.java
index 67ae7de928..53d29c51bf 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ManualHandlingIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/ManualHandlingIT.java
@@ -46,7 +46,7 @@ public class ManualHandlingIT extends BaseIntegrationTest {
@Test
public void TestManualHandlingSuccess() {
- MockPostRequestDB();
+ MockPostRequestDB(wireMockServer);
Map<String, Object> variables = new HashMap<>();
variables.put("isDebugLogEnabled","true");
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteGenericVnf.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteGenericVnf.java
index 819962f16c..052fd5dc94 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteGenericVnf.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteGenericVnf.java
@@ -22,15 +22,16 @@ package org.onap.so.bpmn.common;
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.delete;
-import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+import com.github.tomakehurst.wiremock.WireMockServer;
+
public class MockAAIDeleteGenericVnf {
- public MockAAIDeleteGenericVnf(){
- stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/[?]resource-version=0000021"))
+ public MockAAIDeleteGenericVnf(WireMockServer wireMockServer){
+ wireMockServer.stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/[?]resource-version=0000021"))
.willReturn(aResponse()
.withStatus(200)));
- stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718/[?]resource-version=0000018"))
+ wireMockServer.stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718/[?]resource-version=0000018"))
.willReturn(aResponse()
.withStatus(500)
.withHeader("Content-Type", "text/xml")
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteVfModule.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteVfModule.java
index 9cb10a0494..1cbe0b9244 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteVfModule.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIDeleteVfModule.java
@@ -23,31 +23,32 @@ package org.onap.so.bpmn.common;
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.delete;
import static com.github.tomakehurst.wiremock.client.WireMock.get;
-import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+import com.github.tomakehurst.wiremock.WireMockServer;
+
public class MockAAIDeleteVfModule {
- public MockAAIDeleteVfModule()
+ public MockAAIDeleteVfModule(WireMockServer wireMockServer)
{
- stubFor(delete(urlMatching(
+ wireMockServer.stubFor(delete(urlMatching(
"/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a73/[?]resource-version=0000073"))
.willReturn(aResponse().withStatus(200)));
- stubFor(delete(urlMatching(
+ wireMockServer.stubFor(delete(urlMatching(
"/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c720/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a75/[?]resource-version=0000075"))
.willReturn(aResponse().withStatus(200)));
- stubFor(delete(urlMatching(
+ wireMockServer.stubFor(delete(urlMatching(
"/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a78/[?]resource-version=0000078"))
.willReturn(aResponse().withStatus(200)));
- stubFor(delete(urlMatching(
+ wireMockServer.stubFor(delete(urlMatching(
"/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c719/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a77/[?]resource-version=0000077"))
.willReturn(aResponse().withStatus(500).withHeader("Content-Type", "text/xml")
.withBodyFile("aaiFault.xml")));
- stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy\\?network-policy-fqdn=.*"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy\\?network-policy-fqdn=.*"))
.willReturn(aResponse().withStatus(200).withHeader("Content-Type", "text/xml")
.withBodyFile("VfModularity/QueryNetworkPolicy_AAIResponse_Success.xml")));
- stubFor(delete(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/.*"))
+ wireMockServer.stubFor(delete(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/.*"))
.willReturn(aResponse().withStatus(200)));
}
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIGenericVnfSearch.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIGenericVnfSearch.java
index b46d528cc5..1d6337ffc4 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIGenericVnfSearch.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/MockAAIGenericVnfSearch.java
@@ -22,30 +22,31 @@ package org.onap.so.bpmn.common;
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.get;
-import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
+import com.github.tomakehurst.wiremock.WireMockServer;
+
public class MockAAIGenericVnfSearch {
private static final String EOL = "\n";
- public MockAAIGenericVnfSearch(){
+ public MockAAIGenericVnfSearch(WireMockServer wireMockServer){
String body;
// The following stubs are for CreateAAIVfModule and UpdateAAIVfModule
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC23&depth=1"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC23&depth=1"))
.willReturn(aResponse()
.withStatus(500)
.withHeader("Content-Type", "text/xml")
.withBodyFile("aaiFault.xml")));
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC22&depth=1"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC22&depth=1"))
.willReturn(aResponse()
.withStatus(404)
.withHeader("Content-Type", "text/xml")
.withBody("Generic VNF Not Found")));
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/768073c7-f41f-4822-9323-b75962763d74[?]depth=1"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/768073c7-f41f-4822-9323-b75962763d74[?]depth=1"))
.willReturn(aResponse()
.withStatus(404)
.withHeader("Content-Type", "text/xml")
@@ -78,12 +79,12 @@ public class MockAAIGenericVnfSearch {
" <l-interfaces/>" + EOL +
" <lag-interfaces/>" + EOL +
"</generic-vnf>" + EOL;
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC21&depth=1"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC21&depth=1"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "text/xml")
.withBody(body)));
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721[?]depth=1"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721[?]depth=1"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "text/xml")
@@ -126,12 +127,12 @@ public class MockAAIGenericVnfSearch {
" <l-interfaces/>" + EOL +
" <lag-interfaces/>" + EOL +
"</generic-vnf>" + EOL;
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC20&depth=1"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/[?]vnf-name=STMTN5MMSC20&depth=1"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "text/xml")
.withBody(body)));
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4[?]depth=1"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4[?]depth=1"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "text/xml")
@@ -139,13 +140,13 @@ public class MockAAIGenericVnfSearch {
// The following stubs are for DeleteAAIVfModule
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c723[?]depth=1"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c723[?]depth=1"))
.willReturn(aResponse()
.withStatus(500)
.withHeader("Content-Type", "text/xml")
.withBodyFile("aaiFault.xml")));
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c722[?]depth=1"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c722[?]depth=1"))
.willReturn(aResponse()
.withStatus(404)
.withHeader("Content-Type", "text/xml")
@@ -178,7 +179,7 @@ public class MockAAIGenericVnfSearch {
" <l-interfaces/>" + EOL +
" <lag-interfaces/>" + EOL +
"</generic-vnf>" + EOL;
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721[?]depth=1"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721[?]depth=1"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "text/xml")
@@ -221,7 +222,7 @@ public class MockAAIGenericVnfSearch {
" <l-interfaces/>" + EOL +
" <lag-interfaces/>" + EOL +
"</generic-vnf>" + EOL;
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c720[?]depth=1"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c720[?]depth=1"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "text/xml")
@@ -264,7 +265,7 @@ public class MockAAIGenericVnfSearch {
" <l-interfaces/>" + EOL +
" <lag-interfaces/>" + EOL +
"</generic-vnf>" + EOL;
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c719[?]depth=1"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c719[?]depth=1"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "text/xml")
@@ -297,7 +298,7 @@ public class MockAAIGenericVnfSearch {
" <l-interfaces/>" + EOL +
" <lag-interfaces/>" + EOL +
"</generic-vnf>" + EOL;
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718[?]depth=1"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c718[?]depth=1"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "text/xml")
@@ -330,7 +331,7 @@ public class MockAAIGenericVnfSearch {
" <l-interfaces/>" + EOL +
" <lag-interfaces/>" + EOL +
"</generic-vnf>" + EOL;
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a73"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/a27ce5a9-29c4-4c22-a017-6615ac73c721/vf-modules/vf-module/973ed047-d251-4fb9-bf1a-65b8949e0a73"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "text/xml")
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingIT.java
index 0c88b58b72..4d7a127a85 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingIT.java
@@ -271,7 +271,7 @@ public class OofHomingIT extends BaseIntegrationTest {
@Test
public void testHoming_success_2AR1Vnf() throws Exception {
- mockOof();
+ mockOof(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -323,7 +323,7 @@ public class OofHomingIT extends BaseIntegrationTest {
@Test
public void testHoming_success_2AR1Vnf2Net() throws Exception {
- mockOof();
+ mockOof(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -398,7 +398,7 @@ public class OofHomingIT extends BaseIntegrationTest {
public void testHoming_success_vnfResourceList() throws Exception {
// Create a Service Decomposition
- MockGetServiceResourcesCatalogDataByModelUuid("2f7f309d-c842-4644-a2e4-34167be5eeb4",
+ MockGetServiceResourcesCatalogDataByModelUuid(wireMockServer, "2f7f309d-c842-4644-a2e4-34167be5eeb4",
"/BuildingBlocks/oofCatalogResp.json");
String busKey = UUID.randomUUID().toString();
Map<String, Object> vars = new HashMap<>();
@@ -413,7 +413,7 @@ public class OofHomingIT extends BaseIntegrationTest {
// Invoke Homing
- mockOof();
+ mockOof(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -479,7 +479,7 @@ public class OofHomingIT extends BaseIntegrationTest {
@Test
public void testHoming_success_existingLicense() throws Exception {
- mockOof();
+ mockOof(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<String, Object>();
@@ -549,7 +549,7 @@ public class OofHomingIT extends BaseIntegrationTest {
@Test
public void testHoming_error_badResponse() throws Exception {
- mockOof_500();
+ mockOof_500(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -568,7 +568,7 @@ public class OofHomingIT extends BaseIntegrationTest {
@Test
public void testHoming_error_oofNoSolution() throws Exception {
- mockOof();
+ mockOof(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -590,7 +590,7 @@ public class OofHomingIT extends BaseIntegrationTest {
@Test
public void testHoming_error_oofPolicyException() throws Exception {
- mockOof();
+ mockOof(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -613,7 +613,7 @@ public class OofHomingIT extends BaseIntegrationTest {
@Test
public void testHoming_error_oofServiceException() throws Exception {
- mockOof();
+ mockOof(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java
index b370e6c48f..390f5294aa 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/OofHomingTestIT.java
@@ -279,7 +279,7 @@ public class OofHomingTestIT extends BaseIntegrationTest {
public void testHoming_success_2AR1Vnf() throws Exception {
- mockOof();
+ mockOof(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -332,7 +332,7 @@ public class OofHomingTestIT extends BaseIntegrationTest {
public void testHoming_success_2AR1Vnf2Net() throws Exception {
- mockOof();
+ mockOof(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -409,7 +409,7 @@ public class OofHomingTestIT extends BaseIntegrationTest {
public void testHoming_success_vnfResourceList() throws Exception {
// Create a Service Decomposition
- MockGetServiceResourcesCatalogDataByModelUuid("2f7f309d-c842-4644-a2e4-34167be5eeb4",
+ MockGetServiceResourcesCatalogDataByModelUuid(wireMockServer, "2f7f309d-c842-4644-a2e4-34167be5eeb4",
"/BuildingBlocks/oofCatalogResp.json");
String busKey = UUID.randomUUID().toString();
Map<String, Object> vars = new HashMap<>();
@@ -425,7 +425,7 @@ public class OofHomingTestIT extends BaseIntegrationTest {
// Invoke Homing
- mockOof();
+ mockOof(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -489,7 +489,7 @@ public class OofHomingTestIT extends BaseIntegrationTest {
@Test
public void testHoming_success_existingLicense() throws Exception {
- mockOof();
+ mockOof(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<String, Object>();
@@ -560,7 +560,7 @@ public class OofHomingTestIT extends BaseIntegrationTest {
@Test
public void testHoming_error_badResponse() throws Exception {
- mockOof_500();
+ mockOof_500(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -581,7 +581,7 @@ public class OofHomingTestIT extends BaseIntegrationTest {
@Test
public void testHoming_error_oofNoSolution() throws Exception {
- mockOof();
+ mockOof(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -604,7 +604,7 @@ public class OofHomingTestIT extends BaseIntegrationTest {
@Test
public void testHoming_error_oofPolicyException() throws Exception {
- mockOof();
+ mockOof(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -628,7 +628,7 @@ public class OofHomingTestIT extends BaseIntegrationTest {
@Test
public void testHoming_error_oofServiceException() throws Exception {
- mockOof();
+ mockOof(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java
index 8b8abab6b2..c994173cd7 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/PrepareUpdateAAIVfModuleIT.java
@@ -61,9 +61,9 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest {
String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml");
- MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
- MockPutGenericVnf("/skask/vf-modules/vf-module/supercool", "PCRF", 200);
- MockPatchVfModuleId("skask", "supercool");
+ MockGetGenericVnfByIdWithDepth(wireMockServer, "skask", 1, "VfModularity/GenericVnf.xml");
+ MockPutGenericVnf(wireMockServer, "/skask/vf-modules/vf-module/supercool", "PCRF", 200);
+ MockPatchVfModuleId(wireMockServer, "skask", "supercool");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -95,7 +95,7 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest {
logStart();
String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml");
- MockGetGenericVnfById_404("skask[?]depth=1");
+ MockGetGenericVnfById_404(wireMockServer, "skask[?]depth=1");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -128,7 +128,7 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest {
String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml").replaceFirst("supercool", "lukewarm");
- MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockGetGenericVnfByIdWithDepth(wireMockServer, "skask", 1, "VfModularity/GenericVnf.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -156,7 +156,7 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest {
String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml").replaceFirst("supercool", "notsocool");
- MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockGetGenericVnfByIdWithDepth(wireMockServer, "skask", 1, "VfModularity/GenericVnf.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -184,8 +184,8 @@ public class PrepareUpdateAAIVfModuleIT extends BaseIntegrationTest {
String prepareUpdateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/PrepareUpdateAAIVfModuleRequest.xml");
- MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
- MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/supercool", 404);
+ MockGetGenericVnfByIdWithDepth(wireMockServer, "skask", 1, "VfModularity/GenericVnf.xml");
+ MockAAIVfModuleBadPatch(wireMockServer, "/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/supercool", 404);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/RainyDayHandlerIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/RainyDayHandlerIT.java
index 7b85edf49a..2f6d2ae85b 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/RainyDayHandlerIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/RainyDayHandlerIT.java
@@ -52,7 +52,7 @@ public class RainyDayHandlerIT extends BaseIntegrationTest {
variables.put("errorText", "update failed");
variables.put("vnfName", "vSAMP1");
- MockPolicyAbort();
+ MockPolicyAbort(wireMockServer);
String businessKey = UUID.randomUUID().toString();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java
index 12e12dc7d6..bf3fefdf9c 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SDNCAdapterRestV2IT.java
@@ -24,7 +24,6 @@ package org.onap.so.bpmn.common;
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.post;
-import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
import java.io.IOException;
@@ -115,7 +114,7 @@ public class SDNCAdapterRestV2IT extends BaseIntegrationTest {
* Defines WireMock stubs needed by these tests.
*/
private void mocks() {
- stubFor(post(urlEqualTo("/SDNCAdapter/v1/sdnc"))
+ wireMockServer.stubFor(post(urlEqualTo("/SDNCAdapter/v1/sdnc"))
.willReturn(aResponse()
.withStatus(202)
.withHeader("Content-Type", "application/json")));
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java
index 2205d01cca..c7ba702212 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/SniroHomingV1IT.java
@@ -140,7 +140,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest {
public void testHoming_success_2AR1Vnf() throws Exception {
- mockSNIRO();
+ mockSNIRO(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -184,7 +184,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest {
public void testHoming_success_2AR1Vnf2Net() throws Exception {
- mockSNIRO();
+ mockSNIRO(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -239,7 +239,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest {
public void testHoming_success_vnfResourceList() throws Exception {
// Create a Service Decomposition
- MockGetServiceResourcesCatalogDataByModelUuid("2f7f309d-c842-4644-a2e4-34167be5eeb4", "/BuildingBlocks/catalogResp.json");
+ MockGetServiceResourcesCatalogDataByModelUuid(wireMockServer, "2f7f309d-c842-4644-a2e4-34167be5eeb4", "/BuildingBlocks/catalogResp.json");
String busKey = UUID.randomUUID().toString();
Map<String, Object> vars = new HashMap<>();
setVariablesForServiceDecomposition(vars, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff");
@@ -251,7 +251,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest {
// Invoke Homing
- mockSNIRO();
+ mockSNIRO(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -290,7 +290,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest {
public void testHoming_success_existingLicense() throws Exception {
- mockSNIRO();
+ mockSNIRO(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<String, Object>();
@@ -351,7 +351,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest {
@Test
public void testHoming_error_badResponse() throws Exception {
- mockSNIRO_500();
+ mockSNIRO_500(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -371,7 +371,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest {
// 1802 merge
public void testHoming_error_sniroNoSolution() throws Exception {
- mockSNIRO();
+ mockSNIRO(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -392,7 +392,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest {
@Test
public void testHoming_error_sniroPolicyException() throws Exception {
- mockSNIRO();
+ mockSNIRO(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -413,7 +413,7 @@ public class SniroHomingV1IT extends BaseIntegrationTest {
@Test
public void testHoming_error_sniroServiceException() throws Exception {
- mockSNIRO();
+ mockSNIRO(wireMockServer);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java
index 48790708f0..5015a1351a 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIGenericVnfIT.java
@@ -62,9 +62,9 @@ public class UpdateAAIGenericVnfIT extends BaseIntegrationTest {
logStart();
String updateAAIGenericVnfRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIGenericVnfRequest.xml");
- MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
- MockPutGenericVnf("/skask", 200);
- MockPatchGenericVnf("skask");
+ MockGetGenericVnfByIdWithDepth(wireMockServer, "skask", 1, "VfModularity/GenericVnf.xml");
+ MockPutGenericVnf(wireMockServer, "/skask", 200);
+ MockPatchGenericVnf(wireMockServer, "skask");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -95,7 +95,7 @@ public class UpdateAAIGenericVnfIT extends BaseIntegrationTest {
String updateAAIGenericVnfRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIGenericVnfRequest.xml");
updateAAIGenericVnfRequest = updateAAIGenericVnfRequest.replaceFirst("introvert", "extrovert");
- MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
+ MockGetGenericVnfByIdWithDepth(wireMockServer, "skask", 1, "VfModularity/GenericVnf.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -123,7 +123,7 @@ public class UpdateAAIGenericVnfIT extends BaseIntegrationTest {
String updateAAIGenericVnfRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIGenericVnfRequest.xml");
- MockGetGenericVnfById_404("skask[?]depth=1");
+ MockGetGenericVnfById_404(wireMockServer, "skask[?]depth=1");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -153,9 +153,9 @@ public class UpdateAAIGenericVnfIT extends BaseIntegrationTest {
String updateAAIGenericVnfRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIGenericVnfRequest.xml");
- MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
- MockPutGenericVnf_Bad("skask", 404);
- MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask", 404);
+ MockGetGenericVnfByIdWithDepth(wireMockServer, "skask", 1, "VfModularity/GenericVnf.xml");
+ MockPutGenericVnf_Bad(wireMockServer, "skask", 404);
+ MockAAIVfModuleBadPatch(wireMockServer, "/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask", 404);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java
index 2ba5c7286e..0a3931a12f 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/UpdateAAIVfModuleIT.java
@@ -61,9 +61,9 @@ public class UpdateAAIVfModuleIT extends BaseIntegrationTest {
logStart();
String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIVfModuleRequest.xml");
- MockGetGenericVnfByIdWithPriority("/skask/vf-modules/vf-module/supercool", 200, "VfModularity/VfModule-supercool.xml");
- MockPutGenericVnf("/skask/vf-modules/vf-module/supercool", "PCRF", 200);
- MockPatchVfModuleId("skask", "supercool");
+ MockGetGenericVnfByIdWithPriority(wireMockServer, "/skask/vf-modules/vf-module/supercool", 200, "VfModularity/VfModule-supercool.xml");
+ MockPutGenericVnf(wireMockServer, "/skask/vf-modules/vf-module/supercool", "PCRF", 200);
+ MockPatchVfModuleId(wireMockServer, "skask", "supercool");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -92,7 +92,7 @@ public class UpdateAAIVfModuleIT extends BaseIntegrationTest {
logStart();
String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIVfModuleRequest.xml");
- MockGetGenericVnfById("/skask/vf-modules/vf-module/.*", "VfModularity/VfModule-supercool.xml", 404);
+ MockGetGenericVnfById(wireMockServer, "/skask/vf-modules/vf-module/.*", "VfModularity/VfModule-supercool.xml", 404);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -121,9 +121,9 @@ public class UpdateAAIVfModuleIT extends BaseIntegrationTest {
logStart();
String updateAAIVfModuleRequest = FileUtil.readResourceFile("__files/VfModularity/UpdateAAIVfModuleRequest.xml");
- MockGetGenericVnfById_404("/skask/vf-modules/vf-module/supercool");
- MockGetGenericVnfById("/skask/vf-modules/vf-module/supercool", "VfModularity/VfModule-supercool.xml", 200);
- MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/supercool", 404);
+ MockGetGenericVnfById_404(wireMockServer, "/skask/vf-modules/vf-module/supercool");
+ MockGetGenericVnfById(wireMockServer, "/skask/vf-modules/vf-module/supercool", "VfModularity/VfModule-supercool.xml", 200);
+ MockAAIVfModuleBadPatch(wireMockServer, "/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/supercool", 404);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java
index 1ef864b543..c0482a52ca 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java
@@ -247,7 +247,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
public void testCreateVfModuleSuccess() throws Exception {
logStart();
- mockVNFPost("", 202, "vnfId");
+ mockVNFPost(wireMockServer, "", 202, "vnfId");
String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
String messageId = requestId + "-" + System.currentTimeMillis();
@@ -276,7 +276,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
public void testUpdateVfModuleSuccess() throws Exception {
logStart();
- mockVNFPut("/vfModuleId", 202);
+ mockVNFPut(wireMockServer, "/vfModuleId", 202);
String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
String messageId = requestId + "-" + System.currentTimeMillis();
@@ -305,7 +305,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
public void testDeleteVfModuleSuccess() throws Exception {
logStart();
- mockVNFDelete("vnfId", "/vfModuleId", 202);
+ mockVNFDelete(wireMockServer, "vnfId", "/vfModuleId", 202);
String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
String messageId = requestId + "-" + System.currentTimeMillis();
@@ -334,7 +334,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
public void testRollbackVfModuleSuccess() throws Exception {
logStart();
- mockVNFRollbackDelete("/vfModuleId", 202);
+ mockVNFRollbackDelete(wireMockServer, "/vfModuleId", 202);
String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
String messageId = requestId + "-" + System.currentTimeMillis();
@@ -363,7 +363,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
public void testCreateVfModuleException() throws Exception {
logStart();
- mockVNFPost("", 202, "vnfId");
+ mockVNFPost(wireMockServer, "", 202, "vnfId");
String requestId = "dffbae0e-5588-4bd6-9749-b0f0adb52312";
String messageId = requestId + "-" + System.currentTimeMillis();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/CreateVcpeResCustServiceIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/CreateVcpeResCustServiceIT.java
index 610930665c..aa65474acc 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/CreateVcpeResCustServiceIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/CreateVcpeResCustServiceIT.java
@@ -24,7 +24,6 @@ import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.get;
import static com.github.tomakehurst.wiremock.client.WireMock.post;
import static com.github.tomakehurst.wiremock.client.WireMock.put;
-import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -101,43 +100,43 @@ public class CreateVcpeResCustServiceIT extends AbstractTestBase {
@Test
public void testCreateVcpeResCustService_Success() throws Exception {
System.out.println("starting: testCreateVcpeResCustService_Success\n");
- MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "2","VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
- MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
- MockGetCustomer(CUST, "VCPE/CreateVcpeResCustService/getCustomer.xml");
- StubResponseOof.mockOof();
+ MockGetServiceResourcesCatalogData(wireMockServer, "uuid-miu-svc-011-abcdef", "2","VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
+ MockGetServiceResourcesCatalogData(wireMockServer, "uuid-miu-svc-011-abcdef", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
+ MockGetCustomer(wireMockServer, CUST, "VCPE/CreateVcpeResCustService/getCustomer.xml");
+ StubResponseOof.mockOof(wireMockServer);
// TODO: the SI should NOT have to be URL-encoded yet again!
- MockPutServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+ MockPutServiceInstance(wireMockServer, CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
- MockNodeQueryServiceInstanceById(INST, "GenericFlows/getSIUrlById.xml");
- MockNodeQueryServiceInstanceById(PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
- MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
- MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockGetGenericVnfByIdWithDepth(".*", 1, "VCPE/CreateVcpeResCustService/GenericVnf.xml");
-
- MockPutGenericVnf(".*");
- MockPatchGenericVnf(".*");
-
- MockGetGenericVnfByIdWithPriority(".*", ".*", 200, "VfModularity/VfModule-new.xml", 5);
- // MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");
- MockPutVfModuleIdNoResponse(".*", "PCRF", ".*");
- MockPutNetwork(".*", "VfModularity/AddNetworkPolicy_AAIResponse_Success.xml", 200);
-
- MockGetNetworkPolicyfqdn(".*","CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml",200);
- MockNodeQueryServiceInstanceByName_404(".*");
-
- mockVNFPost("", 202, ".*");
-
- stubFor(post(urlMatching("/services/rest/v1/vnfs" + ".*" + "/vf-modules" )).willReturn(aResponse().withStatus(202)));
- stubFor(get(urlMatching(".*/business/owning-entities?.*")).willReturn(aResponse().withStatus(404)));
- stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/.*")).willReturn(aResponse().withStatus(200)));
- stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/038d99af-0427-42c2-9d15-971b99b9b489/relationship-list/relationship")).willReturn(aResponse().withStatus(200)));
- stubFor(put(urlMatching(".*/query?.*")).willReturn(aResponse().withStatus(200)));
- MockPostRequestDB();
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
- mockSDNCAdapter(200);
+ MockNodeQueryServiceInstanceById(wireMockServer, INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+ MockPutAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockGetGenericVnfByIdWithDepth(wireMockServer, ".*", 1, "VCPE/CreateVcpeResCustService/GenericVnf.xml");
+
+ MockPutGenericVnf(wireMockServer, ".*");
+ MockPatchGenericVnf(wireMockServer, ".*");
+
+ MockGetGenericVnfByIdWithPriority(wireMockServer, ".*", ".*", 200, "VfModularity/VfModule-new.xml", 5);
+ // MockGetGenericVnfByIdWithDepth(wireMockServer, "skask", 1, "VfModularity/GenericVnf.xml");
+ MockPutVfModuleIdNoResponse(wireMockServer, ".*", "PCRF", ".*");
+ MockPutNetwork(wireMockServer, ".*", "VfModularity/AddNetworkPolicy_AAIResponse_Success.xml", 200);
+
+ MockGetNetworkPolicyfqdn(wireMockServer, ".*","CreateNetworkV2/createNetwork_queryNetworkPolicy_AAIResponse_Success.xml",200);
+ MockNodeQueryServiceInstanceByName_404(wireMockServer, ".*");
+
+ mockVNFPost(wireMockServer, "", 202, ".*");
+
+ wireMockServer.stubFor(post(urlMatching("/services/rest/v1/vnfs" + ".*" + "/vf-modules" )).willReturn(aResponse().withStatus(202)));
+ wireMockServer.stubFor(get(urlMatching(".*/business/owning-entities?.*")).willReturn(aResponse().withStatus(404)));
+ wireMockServer.stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/.*")).willReturn(aResponse().withStatus(200)));
+ wireMockServer.stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/038d99af-0427-42c2-9d15-971b99b9b489/relationship-list/relationship")).willReturn(aResponse().withStatus(200)));
+ wireMockServer.stubFor(put(urlMatching(".*/query?.*")).willReturn(aResponse().withStatus(200)));
+ MockPostRequestDB(wireMockServer);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
+ mockSDNCAdapter(wireMockServer, 200);
Map<String, Object> variables = setupVariables();
@@ -195,33 +194,33 @@ public class CreateVcpeResCustServiceIT extends AbstractTestBase {
@Test
public void testCreateVcpeResCustService_NoParts() throws Exception {
System.out.println("starting: testCreateVcpeResCustService_NoParts\n" );
- MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "2", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json");
- MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json");
- MockGetCustomer(CUST, "VCPE/CreateVcpeResCustService/getCustomer.xml");
+ MockGetServiceResourcesCatalogData(wireMockServer, "uuid-miu-svc-011-abcdef", "2", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json");
+ MockGetServiceResourcesCatalogData(wireMockServer, "uuid-miu-svc-011-abcdef", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesNoData.json");
+ MockGetCustomer(wireMockServer, CUST, "VCPE/CreateVcpeResCustService/getCustomer.xml");
// TODO: the SI should NOT have to be URL-encoded yet again!
- MockPutServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+ MockPutServiceInstance(wireMockServer, CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
- MockNodeQueryServiceInstanceById(INST, "GenericFlows/getSIUrlById.xml");
- MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
- MockNodeQueryServiceInstanceById(PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
- MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, INST, "GenericFlows/getSIUrlById.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
// TODO: should these really be PARENT_INST, or should they be INST?
- MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
-
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
-
- StubResponseOof.mockOof();
- stubFor(get(urlMatching(".*/business/owning-entities?.*")).willReturn(aResponse().withStatus(404)));
- stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/.*")).willReturn(aResponse().withStatus(200)));
- stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/038d99af-0427-42c2-9d15-971b99b9b489/relationship-list/relationship")).willReturn(aResponse().withStatus(200)));
- stubFor(put(urlMatching(".*/query?.*")).willReturn(aResponse().withStatus(200)));
- MockPostRequestDB();
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockPutAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
+
+ StubResponseOof.mockOof(wireMockServer);
+ wireMockServer.stubFor(get(urlMatching(".*/business/owning-entities?.*")).willReturn(aResponse().withStatus(404)));
+ wireMockServer.stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/.*")).willReturn(aResponse().withStatus(200)));
+ wireMockServer.stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/038d99af-0427-42c2-9d15-971b99b9b489/relationship-list/relationship")).willReturn(aResponse().withStatus(200)));
+ wireMockServer.stubFor(put(urlMatching(".*/query?.*")).willReturn(aResponse().withStatus(200)));
+ MockPostRequestDB(wireMockServer);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
Map<String, Object> variables = setupVariables();
@@ -253,30 +252,30 @@ public class CreateVcpeResCustServiceIT extends AbstractTestBase {
@Test
public void testCreateVcpeResCustService_Fault_NoRollback() throws Exception {
System.out.println("starting: testCreateVcpeResCustService_Fault_NoRollback\n");
- MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "2", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
- MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
- MockGetCustomer(CUST, "VCPE/CreateVcpeResCustService/getCustomer.xml");
+ MockGetServiceResourcesCatalogData(wireMockServer, "uuid-miu-svc-011-abcdef", "2", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
+ MockGetServiceResourcesCatalogData(wireMockServer, "uuid-miu-svc-011-abcdef", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
+ MockGetCustomer(wireMockServer, CUST, "VCPE/CreateVcpeResCustService/getCustomer.xml");
// TODO: the SI should NOT have to be URL-encoded yet again!
- MockPutServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+ MockPutServiceInstance(wireMockServer, CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
- MockNodeQueryServiceInstanceById(INST, "GenericFlows/getSIUrlById.xml");
- MockNodeQueryServiceInstanceById(PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
- MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance_500(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
- MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
-
- mockSDNCAdapter(404);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
-
- StubResponseOof.mockOof();
- stubFor(get(urlMatching(".*/business/owning-entities?.*")).willReturn(aResponse().withStatus(404)));
- stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/.*")).willReturn(aResponse().withStatus(200)));
- stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/038d99af-0427-42c2-9d15-971b99b9b489/relationship-list/relationship")).willReturn(aResponse().withStatus(200)));
- stubFor(put(urlMatching(".*/query?.*")).willReturn(aResponse().withStatus(200)));
- MockPostRequestDB();
+ MockNodeQueryServiceInstanceById(wireMockServer, INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance_500(wireMockServer, CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+ MockPutAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+
+ mockSDNCAdapter(wireMockServer, 404);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
+
+ StubResponseOof.mockOof(wireMockServer);
+ wireMockServer.stubFor(get(urlMatching(".*/business/owning-entities?.*")).willReturn(aResponse().withStatus(404)));
+ wireMockServer.stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/.*")).willReturn(aResponse().withStatus(200)));
+ wireMockServer.stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/038d99af-0427-42c2-9d15-971b99b9b489/relationship-list/relationship")).willReturn(aResponse().withStatus(200)));
+ wireMockServer.stubFor(put(urlMatching(".*/query?.*")).willReturn(aResponse().withStatus(200)));
+ MockPostRequestDB(wireMockServer);
Map<String, Object> variables = setupVariables();
@@ -305,33 +304,33 @@ public class CreateVcpeResCustServiceIT extends AbstractTestBase {
@Test
public void testCreateVcpeResCustService_Fault_Rollback() throws Exception {
System.out.println("starting: testCreateVcpeResCustService_Fault_Rollback\n");
- MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "2", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
- MockGetServiceResourcesCatalogData("uuid-miu-svc-011-abcdef", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
- MockGetCustomer(CUST, "VCPE/CreateVcpeResCustService/getCustomer.xml");
+ MockGetServiceResourcesCatalogData(wireMockServer, "uuid-miu-svc-011-abcdef", "2", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
+ MockGetServiceResourcesCatalogData(wireMockServer, "uuid-miu-svc-011-abcdef", "VCPE/CreateVcpeResCustService/getCatalogServiceResourcesData.json");
+ MockGetCustomer(wireMockServer, CUST, "VCPE/CreateVcpeResCustService/getCustomer.xml");
// TODO: the SI should NOT have to be URL-encoded yet again!
- MockPutServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance(CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+ MockPutServiceInstance(wireMockServer, CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST.replace("%", "%25"), "GenericFlows/getServiceInstance.xml");
- MockNodeQueryServiceInstanceById(INST, "GenericFlows/getSIUrlById.xml");
- MockNodeQueryServiceInstanceById(PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
- MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/CreateVcpeResCustService/arGetById.xml");
- MockGetAllottedResource(CUST, SVC, PARENT_INST, ARID, "VCPE/CreateVcpeResCustService/arGetById.xml");
- MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, PARENT_INST, ARID, ARVERS);
-
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
-
- StubResponseOof.mockOof();
- stubFor(get(urlMatching(".*/business/owning-entities?.*")).willReturn(aResponse().withStatus(404)));
- stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/.*")).willReturn(aResponse().withStatus(200)));
- stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/038d99af-0427-42c2-9d15-971b99b9b489/relationship-list/relationship")).willReturn(aResponse().withStatus(200)));
- stubFor(put(urlMatching(".*/query?.*")).willReturn(aResponse().withStatus(200)));
- MockPostRequestDB();
+ MockNodeQueryServiceInstanceById(wireMockServer, INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/CreateVcpeResCustService/arGetById.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID, "VCPE/CreateVcpeResCustService/arGetById.xml");
+ MockPutAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID, ARVERS);
+
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
+
+ StubResponseOof.mockOof(wireMockServer);
+ wireMockServer.stubFor(get(urlMatching(".*/business/owning-entities?.*")).willReturn(aResponse().withStatus(404)));
+ wireMockServer.stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/.*")).willReturn(aResponse().withStatus(200)));
+ wireMockServer.stubFor(put(urlMatching(".*/business/owning-entities/owning-entity/038d99af-0427-42c2-9d15-971b99b9b489/relationship-list/relationship")).willReturn(aResponse().withStatus(200)));
+ wireMockServer.stubFor(put(urlMatching(".*/query?.*")).willReturn(aResponse().withStatus(200)));
+ MockPostRequestDB(wireMockServer);
String req = FileUtil.readResourceFile("__files/VCPE/CreateVcpeResCustService/requestRollback.json");
Map<String, Object> variables = setupVariables();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DeleteVcpeResCustServiceIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DeleteVcpeResCustServiceIT.java
index ca81d99832..aaabf59e6b 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DeleteVcpeResCustServiceIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DeleteVcpeResCustServiceIT.java
@@ -20,22 +20,9 @@
package org.onap.so.bpmn.vcpe;
-import com.github.tomakehurst.wiremock.stubbing.Scenario;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.so.bpmn.common.BPMNUtil;
-import org.onap.so.bpmn.mock.FileUtil;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.UUID;
-
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.delete;
import static com.github.tomakehurst.wiremock.client.WireMock.get;
-import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlMatching;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -51,6 +38,19 @@ import static org.onap.so.bpmn.mock.StubResponseAAI.MockQueryAllottedResourceByI
import static org.onap.so.bpmn.mock.StubResponseDatabase.mockUpdateRequestDB;
import static org.onap.so.bpmn.mock.StubResponseSDNCAdapter.mockSDNCAdapter;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.so.bpmn.common.BPMNUtil;
+import org.onap.so.bpmn.mock.FileUtil;
+
+import com.github.tomakehurst.wiremock.stubbing.Scenario;
+
public class DeleteVcpeResCustServiceIT extends AbstractTestBase {
private static final String PROCNAME = "DeleteVcpeResCustService";
@@ -77,7 +77,7 @@ public class DeleteVcpeResCustServiceIT extends AbstractTestBase {
@Test
public void testDeleteVcpeResCustService_Success() throws Exception {
logStart();
- MockNodeQueryServiceInstanceById(INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, INST, "GenericFlows/getSIUrlById.xml");
// TODO: use INST instead of DEC_INST
/*
@@ -85,15 +85,15 @@ public class DeleteVcpeResCustServiceIT extends AbstractTestBase {
* fail to URL-encode the SI id before performing the query so we'll
* add a stub for that case, too.
*/
- MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_INST, "GenericFlows/getSIUrlById.xml");
/*
- * cannot use MockGetServiceInstance(), because we need to return
+ * cannot use MockGetServiceInstance(wireMockServer, ), because we need to return
* different responses as we traverse through the flow
*/
// initially, the SI includes the ARs
- stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST))
.inScenario("SI retrieval")
.whenScenarioStateIs(Scenario.STARTED)
.willReturn(aResponse()
@@ -103,7 +103,7 @@ public class DeleteVcpeResCustServiceIT extends AbstractTestBase {
.willSetStateTo("ARs Deleted"));
// once the ARs have been deleted, the SI should be empty
- stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/business/customers/customer/" + CUST + "/service-subscriptions/service-subscription/" + SVC + "/service-instances/service-instance/" + INST))
.inScenario("SI retrieval")
.whenScenarioStateIs("ARs Deleted")
.willReturn(aResponse()
@@ -112,34 +112,34 @@ public class DeleteVcpeResCustServiceIT extends AbstractTestBase {
.withBodyFile("VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml")));
// for BRG
- MockQueryAllottedResourceById(AR_BRG_ID, "VCPE/DeleteVcpeResCustService/getBRGArUrlById.xml");
- MockGetAllottedResource(CUST, SVC, INST, AR_BRG_ID, "VCPE/DeleteVcpeResCustService/arGetBRGById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, AR_BRG_ID);
- MockDeleteAllottedResource(CUST, SVC, INST, AR_BRG_ID, ARVERS);
+ MockQueryAllottedResourceById(wireMockServer, AR_BRG_ID, "VCPE/DeleteVcpeResCustService/getBRGArUrlById.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, AR_BRG_ID, "VCPE/DeleteVcpeResCustService/arGetBRGById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, AR_BRG_ID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, AR_BRG_ID, ARVERS);
// for TXC
- MockQueryAllottedResourceById(AR_TXC_ID, "VCPE/DeleteVcpeResCustService/getTXCArUrlById.xml");
- MockGetAllottedResource(CUST, SVC, INST, AR_TXC_ID, "VCPE/DeleteVcpeResCustService/arGetTXCById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, AR_TXC_ID);
- MockDeleteAllottedResource(CUST, SVC, INST, AR_TXC_ID, ARVERS);
+ MockQueryAllottedResourceById(wireMockServer, AR_TXC_ID, "VCPE/DeleteVcpeResCustService/getTXCArUrlById.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, AR_TXC_ID, "VCPE/DeleteVcpeResCustService/arGetTXCById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, AR_TXC_ID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, AR_TXC_ID, ARVERS);
//MockGetGenericVnfById("vnfX.*", "GenericFlows/getGenericVnfByNameResponse.xml");
- stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*"))
+ wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "text/xml")
.withBodyFile("GenericFlows/getGenericVnfByNameResponse.xml")));
- stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*"))
+ wireMockServer.stubFor(delete(urlMatching("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/.*"))
.willReturn(aResponse()
.withStatus(204)
.withHeader("Content-Type", "text/xml")));
- MockDeleteServiceInstance(CUST,SVC,INST,SVC);
+ MockDeleteServiceInstance(wireMockServer, CUST,SVC,INST,SVC);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = setupVariables(businessKey);
@@ -193,7 +193,7 @@ public class DeleteVcpeResCustServiceIT extends AbstractTestBase {
@Test
public void testDeleteVcpeResCustService_NoBRG_NoTXC_NoVNF() throws Exception {
logStart();
- MockNodeQueryServiceInstanceById(INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, INST, "GenericFlows/getSIUrlById.xml");
// TODO: use INST instead of DEC_INST
/*
@@ -201,12 +201,12 @@ public class DeleteVcpeResCustServiceIT extends AbstractTestBase {
* fail to URL-encode the SI id before performing the query so we'll
* add a stub for that case, too.
*/
- MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_INST, "GenericFlows/getSIUrlById.xml");
- MockGetServiceInstance(CUST, SVC, INST, "VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml");
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = setupVariables(businessKey);
@@ -242,7 +242,7 @@ public class DeleteVcpeResCustServiceIT extends AbstractTestBase {
@Test
public void testDeleteVcpeResCustService_Fault() throws Exception {
logStart();
- MockNodeQueryServiceInstanceById(INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, INST, "GenericFlows/getSIUrlById.xml");
// TODO: use INST instead of DEC_INST
/*
@@ -250,14 +250,14 @@ public class DeleteVcpeResCustServiceIT extends AbstractTestBase {
* fail to URL-encode the SI id before performing the query so we'll
* add a stub for that case, too.
*/
- MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_INST, "GenericFlows/getSIUrlById.xml");
- MockGetServiceInstance(CUST, SVC, INST, "VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "VCPE/DeleteVcpeResCustService/getSIAfterDelArs.xml");
// generate failure
- mockSDNCAdapter(404);
+ mockSDNCAdapter(wireMockServer, 404);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = setupVariables(businessKey);
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGIT.java
index 2b1b5a3bd0..da9b45c8c8 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGIT.java
@@ -60,15 +60,15 @@ public class DoCreateAllottedResourceBRGIT extends AbstractTestBase {
* have a bug in that they don't URL-encode the SI id before using
* it in the query
*/
- MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
- MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
- MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
- MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+ MockPutAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables,"testRequestId123");
@@ -99,15 +99,15 @@ public class DoCreateAllottedResourceBRGIT extends AbstractTestBase {
* have a bug in that they don't URL-encode the SI id before using
* it in the query
*/
- MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getNotFound.xml");
- MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
-
- MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
- MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_INST, "GenericFlows/getNotFound.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+ MockPutAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables,"testRequestId124");
@@ -133,16 +133,16 @@ public class DoCreateAllottedResourceBRGIT extends AbstractTestBase {
* have a bug in that they don't URL-encode the SI id before using
* it in the query
*/
- MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
- MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
- MockGetServiceInstance(CUST, SVC, INST, "VCPE/DoCreateAllottedResourceBRG/getSIandAR.xml");
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRG/getArBrg2.xml");
- MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
- MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "VCPE/DoCreateAllottedResourceBRG/getSIandAR.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRG/getArBrg2.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+ MockPutAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables,"testRequestId125");
@@ -174,15 +174,15 @@ public class DoCreateAllottedResourceBRGIT extends AbstractTestBase {
* have a bug in that they don't URL-encode the SI id before using
* it in the query
*/
- MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
- MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getNotFound.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_PARENT_INST, "GenericFlows/getNotFound.xml");
- MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
- MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+ MockPutAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables,"testRequestId126");
@@ -208,15 +208,15 @@ public class DoCreateAllottedResourceBRGIT extends AbstractTestBase {
* have a bug in that they don't URL-encode the SI id before using
* it in the query
*/
- MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
- MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
- MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
- MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
- mockSDNCAdapter(404);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+ MockPutAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ mockSDNCAdapter(wireMockServer, 404);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables,"testRequestId127");
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGRollbackIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGRollbackIT.java
index a19dec1f98..f0d275c5cc 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGRollbackIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceBRGRollbackIT.java
@@ -56,11 +56,11 @@ public class DoCreateAllottedResourceBRGRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceBRGRollback_Success() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -86,11 +86,11 @@ public class DoCreateAllottedResourceBRGRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceBRGRollback_skipRollback() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -115,9 +115,9 @@ public class DoCreateAllottedResourceBRGRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceBRGRollback_DoNotRollBack() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -142,11 +142,11 @@ public class DoCreateAllottedResourceBRGRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceBRGRollback_NoDeactivate() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -173,11 +173,11 @@ public class DoCreateAllottedResourceBRGRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceBRGRollback_NoDelete() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -204,11 +204,11 @@ public class DoCreateAllottedResourceBRGRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceBRGRollback_NoUnassign() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -238,12 +238,12 @@ public class DoCreateAllottedResourceBRGRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceBRGRollback_SubProcessError() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
- mockSDNCAdapter(404);
+ mockSDNCAdapter(wireMockServer, 404);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -265,11 +265,11 @@ public class DoCreateAllottedResourceBRGRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceBRGRollback_JavaException() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceBRGRollback/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCIT.java
index 473661c860..6ecec3240d 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCIT.java
@@ -65,15 +65,15 @@ public class DoCreateAllottedResourceTXCIT extends AbstractTestBase {
* have a bug in that they don't URL-encode the SI id before using
* it in the query
*/
- MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
- MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
- MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
- MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+ MockPutAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables, "testRequestId123");
@@ -108,15 +108,15 @@ public class DoCreateAllottedResourceTXCIT extends AbstractTestBase {
* have a bug in that they don't URL-encode the SI id before using
* it in the query
*/
- MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getNotFound.xml");
- MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_INST, "GenericFlows/getNotFound.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
- MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
- MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+ MockPutAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables, "testRequestId123");
@@ -142,16 +142,16 @@ public class DoCreateAllottedResourceTXCIT extends AbstractTestBase {
* have a bug in that they don't URL-encode the SI id before using
* it in the query
*/
- MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
- MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
- MockGetServiceInstance(CUST, SVC, INST, "VCPE/DoCreateAllottedResourceTXC/getSIandAR.xml");
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc2.xml");
- MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
- MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "VCPE/DoCreateAllottedResourceTXC/getSIandAR.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXC/getArTxc2.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+ MockPutAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables, "testRequestId123");
@@ -184,16 +184,16 @@ public class DoCreateAllottedResourceTXCIT extends AbstractTestBase {
* have a bug in that they don't URL-encode the SI id before using
* it in the query
*/
- MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_INST, "GenericFlows/getSIUrlById.xml");
- MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getNotFound.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_PARENT_INST, "GenericFlows/getNotFound.xml");
- MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
- MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+ MockPutAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables, "testRequestId123");
@@ -219,15 +219,15 @@ public class DoCreateAllottedResourceTXCIT extends AbstractTestBase {
* have a bug in that they don't URL-encode the SI id before using
* it in the query
*/
- MockNodeQueryServiceInstanceById(DEC_INST, "GenericFlows/getSIUrlById.xml");
- MockNodeQueryServiceInstanceById(DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_INST, "GenericFlows/getSIUrlById.xml");
+ MockNodeQueryServiceInstanceById(wireMockServer, DEC_PARENT_INST, "GenericFlows/getParentSIUrlById.xml");
- MockGetServiceInstance(CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
- MockGetServiceInstance(CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
- MockPutAllottedResource(CUST, SVC, PARENT_INST, ARID);
- MockPatchAllottedResource(CUST, SVC, PARENT_INST, ARID);
- mockSDNCAdapter(404);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, INST, "GenericFlows/getServiceInstance.xml");
+ MockGetServiceInstance(wireMockServer, CUST, SVC, PARENT_INST, "GenericFlows/getParentServiceInstance.xml");
+ MockPutAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, PARENT_INST, ARID);
+ mockSDNCAdapter(wireMockServer, 404);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables, "testRequestId123");
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCRollbackIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCRollbackIT.java
index 8b47174b3b..4f81a4f725 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCRollbackIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoCreateAllottedResourceTXCRollbackIT.java
@@ -56,11 +56,11 @@ public class DoCreateAllottedResourceTXCRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceTXCRollback_Success() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -86,11 +86,11 @@ public class DoCreateAllottedResourceTXCRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceTXCRollback_skipRollback() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -115,9 +115,9 @@ public class DoCreateAllottedResourceTXCRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceTXCRollback_DoNotRollBack() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -142,11 +142,11 @@ public class DoCreateAllottedResourceTXCRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceTXCRollback_NoDeactivate() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -173,11 +173,11 @@ public class DoCreateAllottedResourceTXCRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceTXCRollback_NoDelete() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -204,11 +204,11 @@ public class DoCreateAllottedResourceTXCRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceTXCRollback_NoUnassign() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -238,12 +238,12 @@ public class DoCreateAllottedResourceTXCRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceTXCRollback_SubProcessError() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
- mockSDNCAdapter(404);
+ mockSDNCAdapter(wireMockServer, 404);
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -265,11 +265,11 @@ public class DoCreateAllottedResourceTXCRollbackIT extends AbstractTestBase {
@Test
public void testDoCreateAllottedResourceTXCRollback_JavaException() throws Exception {
logStart();
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoCreateAllottedResourceTXCRollback/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceBRGIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceBRGIT.java
index 4edaf7d21f..42f32b8ecc 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceBRGIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceBRGIT.java
@@ -50,12 +50,12 @@ public class DoDeleteAllottedResourceBRGIT extends AbstractTestBase {
@Test
public void testDoDeleteAllottedResourceBRG_Success() {
logStart();
- MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml");
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockQueryAllottedResourceById(wireMockServer, ARID, "GenericFlows/getARUrlById.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -79,12 +79,12 @@ public class DoDeleteAllottedResourceBRGIT extends AbstractTestBase {
@Test
public void testDoDeleteAllottedResourceBRG_ARNotInSDNC() {
logStart();
- MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml");
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockQueryAllottedResourceById(wireMockServer, ARID, "GenericFlows/getARUrlById.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
String businessKey = UUID.randomUUID().toString();
Map<String, Object> variables = new HashMap<>();
@@ -109,13 +109,13 @@ public class DoDeleteAllottedResourceBRGIT extends AbstractTestBase {
@Test
public void testDoDeleteAllottedResourceBRG_SubProcessError() throws Exception {
logStart();
- MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml");
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockQueryAllottedResourceById(wireMockServer, ARID, "GenericFlows/getARUrlById.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceBRG/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
- mockSDNCAdapter(500);
+ mockSDNCAdapter(wireMockServer, 500);
Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables);
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceTXCIT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceTXCIT.java
index 520beaf07b..13ca58be03 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceTXCIT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/vcpe/DoDeleteAllottedResourceTXCIT.java
@@ -50,12 +50,12 @@ public class DoDeleteAllottedResourceTXCIT extends AbstractTestBase {
@Test
public void testDoDeleteAllottedResourceTXC_Success() throws Exception {
logStart();
- MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml");
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockQueryAllottedResourceById(wireMockServer, ARID, "GenericFlows/getARUrlById.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables);
@@ -78,12 +78,12 @@ public class DoDeleteAllottedResourceTXCIT extends AbstractTestBase {
@Test
public void testDoDeleteAllottedResourceTXC_ARNotInSDNC() throws Exception {
logStart();
- MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml");
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockSDNCAdapter(200);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockQueryAllottedResourceById(wireMockServer, ARID, "GenericFlows/getARUrlById.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockSDNCAdapter(wireMockServer, 200);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables);
@@ -104,13 +104,13 @@ public class DoDeleteAllottedResourceTXCIT extends AbstractTestBase {
@Test
public void testDoDeleteAllottedResourceTXC_SubProcessError() throws Exception {
logStart();
- MockQueryAllottedResourceById(ARID, "GenericFlows/getARUrlById.xml");
- MockGetAllottedResource(CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml");
- MockPatchAllottedResource(CUST, SVC, INST, ARID);
- MockDeleteAllottedResource(CUST, SVC, INST, ARID, ARVERS);
- mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");
+ MockQueryAllottedResourceById(wireMockServer, ARID, "GenericFlows/getARUrlById.xml");
+ MockGetAllottedResource(wireMockServer, CUST, SVC, INST, ARID, "VCPE/DoDeleteAllottedResourceTXC/arGetById.xml");
+ MockPatchAllottedResource(wireMockServer, CUST, SVC, INST, ARID);
+ MockDeleteAllottedResource(wireMockServer, CUST, SVC, INST, ARID, ARVERS);
+ mockUpdateRequestDB(wireMockServer, 200, "Database/DBUpdateResponse.xml");
- mockSDNCAdapter(500);
+ mockSDNCAdapter(wireMockServer, 500);
Map<String, Object> variables = new HashMap<>();
setVariablesSuccess(variables);