summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test/java/org/onap
diff options
context:
space:
mode:
authork.kazak <k.kazak@samsung.com>2019-04-03 13:51:40 +0200
committerk.kazak <k.kazak@samsung.com>2019-04-03 13:51:40 +0200
commit5856da6ee75f25b5e370edaa7259d9130a33aa75 (patch)
tree94dff81be087405601609a16a44276533df2a59b /bpmn/MSOCommonBPMN/src/test/java/org/onap
parent3690db02a3035306d6be5fae7529a2f27b90ee71 (diff)
Fix runtime bugs in bpmn groovy
DoDeleteVfModuleV2: non-existing variable uri (was renamed to resourceUri) DoUpdateNetworkInstance: queryIdResponse type is expected to be L3Network UpdateVfModuleVolumeInfraV1: non-existing variable cloudOwner Include tests for those fixes to build Change-Id: Icaea91260fbf6603f134df893a64ec1ca5ac40ab Issue-ID: SO-1649 Signed-off-by: k.kazak <k.kazak@samsung.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test/java/org/onap')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java35
1 files changed, 28 insertions, 7 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java
index 80d8d928aa..80625dd4d5 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java
@@ -552,6 +552,21 @@ public class StubResponseAAI {
.withBodyFile(responseFile)));
}
+ public static void MockPostNetwork(WireMockServer wireMockServer, String networkId) {
+ wireMockServer.stubFor(post(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network/" + networkId))
+ .willReturn(aResponse()
+ .withStatus(201)
+ .withHeader("Content-Type", "text/xml")));
+ }
+
+ public static void MockPostNetworkSubnet(WireMockServer wireMockServer, String networkId, String subnetId) {
+ wireMockServer.stubFor(post(urlMatching(
+ "/aai/v[0-9]+/network/l3-networks/l3-network/" + networkId + "/subnets/subnet/" + subnetId))
+ .willReturn(aResponse()
+ .withStatus(201)
+ .withHeader("Content-Type", "text/xml")));
+ }
+
public static void MockGetNetworkName(WireMockServer wireMockServer, String networkPolicyName, String responseFile, int statusCode) {
wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network[?]network-name=" + networkPolicyName))
.willReturn(aResponse()
@@ -560,13 +575,19 @@ public class StubResponseAAI {
.withBodyFile(responseFile)));
}
- public static void MockGetNetworkVpnBinding(WireMockServer wireMockServer, String responseFile, String vpnBinding) {
- wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/vpn-bindings/vpn-binding/"+vpnBinding + "[?]depth=all"))
- .willReturn(aResponse()
- .withStatus(200)
- .withHeader("Content-Type", "text/xml")
- .withBodyFile(responseFile)));
- }
+ public static void MockGetNetworkVpnBinding(WireMockServer wireMockServer, String responseFile, String vpnBinding) {
+ MockGetNetworkVpnBindingWithDepth(wireMockServer, responseFile, vpnBinding, "all");
+ }
+
+ public static void MockGetNetworkVpnBindingWithDepth(WireMockServer wireMockServer, String responseFile,
+ String vpnBinding, String depth) {
+ wireMockServer.stubFor(
+ get(urlMatching("/aai/v[0-9]+/network/vpn-bindings/vpn-binding/" + vpnBinding + "[?]depth=" + depth))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "text/xml")
+ .withBodyFile(responseFile)));
+ }
public static void MockGetNetworkPolicy(WireMockServer wireMockServer, String responseFile, String policy) {
wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/"+policy + "[?]depth=all"))