diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-28 14:42:53 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2019-03-28 14:43:16 -0400 |
commit | 3225f51c16843cc9de7a485ad37d37d9cbd4f973 (patch) | |
tree | 1acdb3a1e533ff82c7aefbf37aca7ef6bd653ee3 /bpmn/so-bpmn-tasks/src/test/java | |
parent | 6ab58d3a85a31badcd1f1f4ace5c37d7a4ba7e96 (diff) |
delete with payload does not work
corrected wiremock stub after client delete change
changed the method used to create a delete with payload
Change-Id: I3cbda716af30e0d2954b42a4ac965e53b4897924
Issue-ID: SO-1712
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test/java')
2 files changed, 10 insertions, 8 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/NetworkAdapterClientIT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/NetworkAdapterClientIT.java index 1bcc464fa0..d362996948 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/NetworkAdapterClientIT.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/network/NetworkAdapterClientIT.java @@ -21,6 +21,7 @@ package org.onap.so.client.adapter.network; 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.equalTo; import static com.github.tomakehurst.wiremock.client.WireMock.get; import static com.github.tomakehurst.wiremock.client.WireMock.post; @@ -104,7 +105,7 @@ public class NetworkAdapterClientIT extends BaseIntegrationTest{ DeleteNetworkResponse mockResponse = new DeleteNetworkResponse(); mockResponse.setNetworkDeleted(true); - stubFor(post(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_NETWORK_ID)) + stubFor(delete(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_NETWORK_ID)) .willReturn(aResponse().withHeader("Content-Type", "application/json") .withBody(mapper.writeValueAsString(mockResponse)).withStatus(200))); @@ -119,7 +120,7 @@ public class NetworkAdapterClientIT extends BaseIntegrationTest{ DeleteNetworkError mockResponse = new DeleteNetworkError(); mockResponse.setMessage("Error in delete network"); - stubFor(post(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_NETWORK_ID)) + stubFor(delete(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_NETWORK_ID)) .willReturn(aResponse().withHeader("Content-Type", "application/json") .withBody(mapper.writeValueAsString(mockResponse)).withStatus(500))); @@ -136,7 +137,7 @@ public class NetworkAdapterClientIT extends BaseIntegrationTest{ RollbackNetworkResponse mockResponse = new RollbackNetworkResponse(); mockResponse.setNetworkRolledBack(true); - stubFor(post(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_NETWORK_ID)) + stubFor(delete(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_NETWORK_ID)) .willReturn(aResponse().withHeader("Content-Type", "application/json") .withBody(mapper.writeValueAsString(mockResponse)).withStatus(200))); @@ -154,7 +155,7 @@ public class NetworkAdapterClientIT extends BaseIntegrationTest{ RollbackNetworkError mockResponse = new RollbackNetworkError(); mockResponse.setMessage("Error in rollback network"); - stubFor(post(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_NETWORK_ID)) + stubFor(delete(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_NETWORK_ID)) .willReturn(aResponse().withHeader("Content-Type", "application/json") .withBody(mapper.writeValueAsString(mockResponse)).withStatus(500))); diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfAdapterClientIT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfAdapterClientIT.java index 3387920d40..cb3d91b82a 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfAdapterClientIT.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/adapter/vnf/VnfAdapterClientIT.java @@ -21,6 +21,7 @@ package org.onap.so.client.adapter.vnf; 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.equalTo; import static com.github.tomakehurst.wiremock.client.WireMock.get; import static com.github.tomakehurst.wiremock.client.WireMock.post; @@ -102,7 +103,7 @@ public class VnfAdapterClientIT extends BaseIntegrationTest{ RollbackVfModuleResponse mockResponse = new RollbackVfModuleResponse(); mockResponse.setVfModuleRolledback(true); stubFor( - post(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_VNF_ID + "/vf-modules/" + AAI_VF_MODULE_ID + "/rollback")) + delete(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_VNF_ID + "/vf-modules/" + AAI_VF_MODULE_ID + "/rollback")) .willReturn(aResponse().withHeader("Content-Type", "application/json") .withBody(mapper.writeValueAsString(mockResponse)).withStatus(200))); @@ -120,7 +121,7 @@ public class VnfAdapterClientIT extends BaseIntegrationTest{ VfModuleExceptionResponse mockResponse = new VfModuleExceptionResponse(); mockResponse.setMessage("Error in rollback Vf module"); stubFor( - post(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_VNF_ID + "/vf-modules/" + AAI_VF_MODULE_ID + "/rollback")) + delete(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_VNF_ID + "/vf-modules/" + AAI_VF_MODULE_ID + "/rollback")) .willReturn(aResponse().withHeader("Content-Type", "application/json") .withBody(mapper.writeValueAsString(mockResponse)).withStatus(500))); @@ -134,7 +135,7 @@ public class VnfAdapterClientIT extends BaseIntegrationTest{ DeleteVfModuleResponse mockResponse = new DeleteVfModuleResponse(); mockResponse.setVfModuleDeleted(true); - stubFor(post(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_VNF_ID + "/vf-modules/" + AAI_VF_MODULE_ID)) + stubFor(delete(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_VNF_ID + "/vf-modules/" + AAI_VF_MODULE_ID)) .willReturn(aResponse().withHeader("Content-Type", "application/json") .withBody(mapper.writeValueAsString(mockResponse)).withStatus(200))); @@ -149,7 +150,7 @@ public class VnfAdapterClientIT extends BaseIntegrationTest{ VfModuleExceptionResponse mockResponse = new VfModuleExceptionResponse(); mockResponse.setMessage("Error in delete Vf module"); - stubFor(post(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_VNF_ID + "/vf-modules/" + AAI_VF_MODULE_ID)) + stubFor(delete(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_VNF_ID + "/vf-modules/" + AAI_VF_MODULE_ID)) .willReturn(aResponse().withHeader("Content-Type", "application/json") .withBody(mapper.writeValueAsString(mockResponse)).withStatus(500))); |