summaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-openstack-adapters/src')
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java5
-rw-r--r--adapters/mso-openstack-adapters/src/test/resources/__files/MulticloudGetStackExists.json34
2 files changed, 37 insertions, 2 deletions
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java
index 9d13cc10a3..5f2057524f 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java
@@ -24,6 +24,7 @@ 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.post;
+import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -138,9 +139,9 @@ public class MsoVnfMulticloudAdapterImplTest extends BaseRestTestUtils {
msoRequest.setServiceInstanceId("12345");
wireMockServer.stubFor(
- get(urlPathEqualTo("/api/multicloud/v1/CloudOwner/MTN13/infra_workload/vfname")).willReturn(aResponse()
+ get(urlEqualTo("/api/multicloud/v1/CloudOwner/MTN13/infra_workload?name=vfname")).willReturn(aResponse()
// .withHeader()
- .withBodyFile("MulticloudResponse_Stack.json").withStatus(HttpStatus.SC_OK)));
+ .withBodyFile("MulticloudGetStackExists.json").withStatus(HttpStatus.SC_OK)));
try {
instance.createVfModule("MTN13", "CloudOwner", "123", "vf", "v1", "genericVnfId", "vfname", "vfModuleId",
diff --git a/adapters/mso-openstack-adapters/src/test/resources/__files/MulticloudGetStackExists.json b/adapters/mso-openstack-adapters/src/test/resources/__files/MulticloudGetStackExists.json
new file mode 100644
index 0000000000..41a9959812
--- /dev/null
+++ b/adapters/mso-openstack-adapters/src/test/resources/__files/MulticloudGetStackExists.json
@@ -0,0 +1,34 @@
+{
+ "template_type": "heat",
+ "workload_id": "vfname",
+ "workload_status": "GET_COMPLETE",
+ "workload_status_reason": {
+ "stacks": [
+ {
+ "id": "vfname",
+ "links" : [
+ {
+ "href" : "port",
+ "rel" : "self"
+ }
+ ],
+ "stack_name": "vfname",
+ "stack_status": "CREATE_COMPLETE",
+ "creation_time": "2019-03-21T03:17:32Z",
+ "description": "Sample stack response",
+ "stack_owner": "stack_Owner",
+ "capabilities": [],
+ "parameters": {
+ "OS::project_id": "0e148b76ee8c42f78d37013bf6b7b1ae",
+ "apt_proxy": "10.12.5.2:8000",
+ "etcd_vm_flavor": "m1.medium",
+ "docker_version": "17.03.2",
+ "portal_hostname": "portal.api.simpledemo.onap.org",
+ "docker_proxy": "10.12.5.2:5000",
+ "kubectl_version": "1.11.5",
+ "use_ramdisk": "false"
+ }
+ }
+ ]
+ }
+}