aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcessTest.groovy16
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java4
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockCMExpected.json2
4 files changed, 19 insertions, 5 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcessTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcessTest.groovy
index 8ac8f25eb1..4b0c33ab99 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcessTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CompleteMsoProcessTest.groovy
@@ -57,6 +57,19 @@ class CompleteMsoProcessTest {
<sdncadapterworkflow:mso-bpel-name>UCPELayer3ServiceActivateV1</sdncadapterworkflow:mso-bpel-name>
</sdncadapterworkflow:MsoCompletionRequest>
"""
+
+ private String completeMsoNetworkProcessRequest = """
+ <aetgt:MsoCompletionRequest xmlns:aetgt="http://org.onap/so/workflow/schema/v1"
+ xmlns:ns="http://org.onap/so/request/types/v1">
+ <request-info xmlns="http://org.onap/so/infra/vnf-request/v1">
+ <request-id>bd631913-cfc6-488b-ba22-6b98504f703d</request-id>
+ <action>CREATE</action>
+ <source>VID</source>
+ </request-info>
+ <aetgt:status-message>Resource Completed Successfully</aetgt:status-message>
+ <aetgt:networkId>bd631913-cfc6-488b-ba22-6b98504f703d</aetgt:networkId>
+ <aetgt:mso-bpel-name>BPMN Network action: CREATE</aetgt:mso-bpel-name>
+ </aetgt:MsoCompletionRequest>"""
@Test
public void testPreProcessRequest() {
@@ -117,7 +130,7 @@ class CompleteMsoProcessTest {
<statusMessage>Resource Completed Successfully</statusMessage>
<requestStatus>COMPLETE</requestStatus>
<progress>100</progress>
-
+ <networkId>bd631913-cfc6-488b-ba22-6b98504f703d</networkId>
</req:updateInfraRequest>
</soapenv:Body>
</soapenv:Envelope>"""
@@ -130,6 +143,7 @@ class CompleteMsoProcessTest {
when(mockExecution.getVariable("CMSO_mso-bpel-name")).thenReturn("BPEL")
when(mockExecution.getVariable("mso.adapters.db.auth")).thenReturn("757A94191D685FD2092AC1490730A4FC");
when(mockExecution.getVariable("mso.msoKey")).thenReturn("07a7159d3bf51a0e53be7a8f89699be7");
+ when(mockExecution.getVariable("CompleteMsoProcessRequest")).thenReturn(completeMsoNetworkProcessRequest);
CompleteMsoProcess completeMsoProcess = new CompleteMsoProcess()
completeMsoProcess.setUpdateDBstatustoSuccessPayload(mockExecution)
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java
index a08d8ca25d..20c69fafe3 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/appc/payload/PayloadClientTest.java
@@ -66,8 +66,8 @@ public class PayloadClientTest {
@Test
public void healthCheckFormatTest() throws Exception {
- String payloadResult = "{\\\"request-parameters\\\":{\\\"vnf-host-ip-address\\\":\\\"vnfHostIpAddress1\\\"}}";
- Optional<String> payloadClient = PayloadClient.healthCheckFormat("vnfName1", "vnfHostIpAddress1");
+ String payloadResult = "{\"request-parameters\":{\"host-ip-address\":\"hostIpAddress1\"}}";
+ Optional<String> payloadClient = PayloadClient.healthCheckFormat("vnfName1", "hostIpAddress1");
assertEquals(payloadResult, payloadClient.get());
}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
index e5138b394c..94dbbf427c 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java
@@ -549,7 +549,7 @@ public class BBInputSetupMapperLayerTest {
@Test
public void testMapOrchestrationContext() throws IOException {
OrchestrationContext expected = new OrchestrationContext();
- expected.setIsRollbackEnabled(false);
+ expected.setIsRollbackEnabled(true);
RequestDetails requestDetails = mapper.readValue(new File(RESOURCE_PATH + "RequestDetailsInput_mapReqContext.json"), RequestDetails.class);
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockCMExpected.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockCMExpected.json
index d3698771bf..60dd880040 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockCMExpected.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockCMExpected.json
@@ -10,7 +10,7 @@
"configurationParameters": []
},
"orchContext": {
- "is-rollback-enabled": true
+ "is-rollback-enabled": false
},
"cloudRegion": {
"lcp-cloud-region-id" : "myRegionId",