aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test/java/org
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-03-28 00:10:43 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-28 00:10:43 +0000
commitb4fa814196558504725bd616c3c2b3397132e955 (patch)
tree600f01def646aee3e81c4bbdf39e78d968d88eea /bpmn/MSOCommonBPMN/src/test/java/org
parentf0dab732f9b35280334b2b33a3f55dabe6d9016a (diff)
parent48334fbe424dc95dd7779bd71d1eae0c46f58d41 (diff)
Merge "Correct URLs mocked by VNF Adapter Test, again"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test/java/org')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java5
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseVNFAdapter.java46
2 files changed, 46 insertions, 5 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java
index b143204fc9..ea49176df0 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java
@@ -229,7 +229,6 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
}
@Test
- @Ignore // 1802 merge
@Deployment(resources = {
"subprocess/VnfAdapterRestV1.bpmn"
})
@@ -261,7 +260,6 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
}
@Test
- @Ignore // 1802 merge
@Deployment(resources = {
"subprocess/VnfAdapterRestV1.bpmn"
})
@@ -293,7 +291,6 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
}
@Test
- @Ignore // 1802 merge
@Deployment(resources = {
"subprocess/VnfAdapterRestV1.bpmn"
})
@@ -324,7 +321,6 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
logEnd();
}
- @Ignore // 1802 merge
@Test
@Deployment(resources = {
"subprocess/VnfAdapterRestV1.bpmn"
@@ -357,7 +353,6 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
}
@Test
- @Ignore // 1802 merge
@Deployment(resources = {
"subprocess/VnfAdapterRestV1.bpmn"
})
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseVNFAdapter.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseVNFAdapter.java
index b4aca5081e..d518ab0b1c 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseVNFAdapter.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseVNFAdapter.java
@@ -80,6 +80,10 @@ public class StubResponseVNFAdapter {
.willReturn(aResponse()
.withStatus(statusCode)
.withHeader("Content-Type", "application/xml")));
+ stubFor(post(urlEqualTo("/vnfs/rest/v1/vnfs/" + vnfId + "/vf-modules" + vfModuleId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
}
public static void mockVNFPut(String vfModuleId, int statusCode) {
@@ -87,6 +91,10 @@ public class StubResponseVNFAdapter {
.willReturn(aResponse()
.withStatus(statusCode)
.withHeader("Content-Type", "application/xml")));
+ stubFor(put(urlEqualTo("/vnfs/rest/v1/vnfs/vnfId/vf-modules" + vfModuleId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
}
public static void mockVNFPut(String vnfId, String vfModuleId, int statusCode) {
@@ -94,6 +102,10 @@ public class StubResponseVNFAdapter {
.willReturn(aResponse()
.withStatus(statusCode)
.withHeader("Content-Type", "application/xml")));
+ stubFor(put(urlEqualTo("/vnfs/rest/v1/vnfs/" + vnfId + "/vf-modules" + vfModuleId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
}
public static void mockVNFDelete(String vnfId, String vfModuleId, int statusCode) {
@@ -101,6 +113,10 @@ public class StubResponseVNFAdapter {
.willReturn(aResponse()
.withStatus(statusCode)
.withHeader("Content-Type", "application/xml")));
+ stubFor(delete(urlEqualTo("/vnfs/rest/v1/vnfs/" + vnfId + "/vf-modules" + vfModuleId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
}
public static void mockVNFRollbackDelete(String vfModuleId, int statusCode) {
@@ -108,6 +124,10 @@ public class StubResponseVNFAdapter {
.willReturn(aResponse()
.withStatus(statusCode)
.withHeader("Content-Type", "application/xml")));
+ stubFor(delete(urlEqualTo("/vnfs/rest/v1/vnfs/vnfId/vf-modules" + vfModuleId + "/rollback"))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
}
public static void mockPutVNFVolumeGroup(String volumeGroupId, int statusCode) {
@@ -115,6 +135,10 @@ public class StubResponseVNFAdapter {
.willReturn(aResponse()
.withStatus(statusCode)
.withHeader("Content-Type", "application/xml")));
+ stubFor(put(urlEqualTo("/vnfs/rest/v1/volume-groups/" + volumeGroupId))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
}
public static void mockPutVNFVolumeGroupRollback(String volumeGroupId, int statusCode) {
@@ -122,24 +146,38 @@ public class StubResponseVNFAdapter {
.willReturn(aResponse()
.withStatus(statusCode)
.withHeader("Content-Type", "application/xml")));
+ stubFor(delete(urlMatching("/vnfs/rest/v1/volume-groups/" + volumeGroupId + "/rollback"))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
}
public static void mockPostVNFVolumeGroup(int statusCode) {
stubFor(post(urlEqualTo("/vnfs/v1/volume-groups"))
.willReturn(aResponse()
.withStatus(statusCode)
.withHeader("Content-Type", "application/xml")));
+ stubFor(post(urlEqualTo("/vnfs/rest/v1/volume-groups"))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
}
public static void mockVNFAdapterRest(String vnfId) {
stubFor(post(urlEqualTo("/vnfs/v1/vnfs/" + vnfId + "/vf-modules"))
.willReturn(aResponse()
.withStatus(200)));
+ stubFor(post(urlEqualTo("/vnfs/rest/v1/vnfs/" + vnfId + "/vf-modules"))
+ .willReturn(aResponse()
+ .withStatus(200)));
}
public static void mockVNFAdapterRest_500(String vnfId) {
stubFor(post(urlEqualTo("/vnfs/v1/vnfs/" + vnfId + "/vf-modules"))
.willReturn(aResponse()
.withStatus(500)));
+ stubFor(post(urlEqualTo("/vnfs/rest/v1/vnfs/" + vnfId + "/vf-modules"))
+ .willReturn(aResponse()
+ .withStatus(500)));
}
public static void mockVfModuleDelete(String volumeGroupId) {
@@ -147,6 +185,10 @@ public class StubResponseVNFAdapter {
.willReturn(aResponse()
.withStatus(202)
.withHeader("Content-Type", "application/xml")));
+ stubFor(delete(urlMatching("/vnfs/rest/v1/volume-groups/"+ volumeGroupId))
+ .willReturn(aResponse()
+ .withStatus(202)
+ .withHeader("Content-Type", "application/xml")));
}
public static void mockVfModuleDelete(String volumeGroupId, int statusCode) {
@@ -154,5 +196,9 @@ public class StubResponseVNFAdapter {
.willReturn(aResponse()
.withStatus(statusCode)
.withHeader("Content-Type", "application/xml")));
+ stubFor(delete(urlMatching("/vnfs/rest/v1/volume-groups/78987"))
+ .willReturn(aResponse()
+ .withStatus(statusCode)
+ .withHeader("Content-Type", "application/xml")));
}
}