aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN
diff options
context:
space:
mode:
authorArthur Martella <amartell@research.att.com>2018-03-26 15:30:01 -0400
committerRob Daugherty <rd472p@att.com>2018-03-27 22:05:51 +0000
commit48334fbe424dc95dd7779bd71d1eae0c46f58d41 (patch)
tree344b74afdc4a7e1799fff2764d19d5b476d30518 /bpmn/MSOCommonBPMN
parentb4473da1a753e63e66f5a9a3b1984fd4736273c2 (diff)
Correct URLs mocked by VNF Adapter Test, again
This time the URLs cover both those used by MSOCommonBPMN tests and MSOInfrastructureBPMN tests. Change-Id: I7d5587cc708b4773480e9182f06b260a0b4e3af0 Issue-ID: SO-489 Signed-off-by: Arthur Martella <amartell@research.att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN')
-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")));
}
}