diff options
author | Steve Smokowski <ss835w@att.com> | 2019-04-11 11:41:29 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-11 11:41:29 +0000 |
commit | fb4b7ea522f859eeb8813f30004dd7c1fb7b3409 (patch) | |
tree | b46bba37c760982a3bd12a65be9372998fc61b5c /adapters/mso-openstack-adapters/src/test | |
parent | f4c77048e9fa8e708ff9fb5c09448623acc3ef4c (diff) | |
parent | 287362502adc4485fc43f9364fd1829adec55ab6 (diff) |
Merge "Update multicloud plugin GET handling"
Diffstat (limited to 'adapters/mso-openstack-adapters/src/test')
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" + } + } + ] + } +} |