aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-common/src/test
diff options
context:
space:
mode:
authorSmokowski, Steven <steve.smokowski@att.com>2019-09-24 14:57:51 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-09-24 17:24:25 -0400
commit4891eedd15cff1e582d052843eb8c11a14c5d836 (patch)
tree5f014cdd42f99eef78bd7cd4d3eae80be8d32a02 /mso-api-handlers/mso-api-handler-common/src/test
parent96231b3365d378a86b71d93b8a7d64aef8be531c (diff)
Update Resume Logic and Add Workflow Listeners
Updated with the error log messages Changed the code to do string compare for eventName update workflowaction to only persist if not resume Issue-ID: SO-2363 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I139f2427ae0f0253a15cc51003318686568cb514
Diffstat (limited to 'mso-api-handlers/mso-api-handler-common/src/test')
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java6
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/test/resources/CamundaClientTest/WrappedVIDRequest.json103
2 files changed, 105 insertions, 4 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java
index 36d004e87d..94c62a9689 100644
--- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java
@@ -47,11 +47,11 @@ import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
+import org.skyscreamer.jsonassert.JSONAssert;
import org.springframework.mock.env.MockEnvironment;
import com.fasterxml.jackson.core.JsonGenerationException;
import com.fasterxml.jackson.databind.JsonMappingException;
-
/**
* This class implements test methods of Camunda Beans.
*
@@ -164,10 +164,10 @@ public class CamundaClientTest {
String testResult = testClient.wrapVIDRequest(requestId, isBaseVfModule, recipeTimeout, requestAction,
serviceInstanceId, pnfCorrelationId, vnfId, vfModuleId, volumeGroupId, networkId, configurationId,
serviceType, vnfType, vfModuleType, networkType, requestDetails, apiVersion, aLaCarte, requestUri, "",
- instanceGroupId);
+ instanceGroupId, false);
String expected = inputStream("/WrappedVIDRequest.json");
- assertEquals(expected, testResult);
+ JSONAssert.assertEquals(expected, testResult, false);
}
@Test
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/resources/CamundaClientTest/WrappedVIDRequest.json b/mso-api-handlers/mso-api-handler-common/src/test/resources/CamundaClientTest/WrappedVIDRequest.json
index b9d0a8c3c6..3353f8c7ce 100644
--- a/mso-api-handlers/mso-api-handler-common/src/test/resources/CamundaClientTest/WrappedVIDRequest.json
+++ b/mso-api-handlers/mso-api-handler-common/src/test/resources/CamundaClientTest/WrappedVIDRequest.json
@@ -1 +1,102 @@
-{"variables":{"bpmnRequest":{"value":"{requestDetails: }","type":"String"},"requestId":{"value":"f7ce78bb-423b-11e7-93f8-0050569a796","type":"String"},"mso-request-id":{"value":"f7ce78bb-423b-11e7-93f8-0050569a796","type":"String"},"isBaseVfModule":{"value":true,"type":"Boolean"},"recipeTimeout":{"value":10000,"type":"Integer"},"requestAction":{"value":"createInstance","type":"String"},"serviceInstanceId":{"value":"12345679","type":"String"},"pnfCorrelationId":{"value":"12345679","type":"String"},"vnfId":{"value":"234567891","type":"String"},"vfModuleId":{"value":"345678912","type":"String"},"volumeGroupId":{"value":"456789123","type":"String"},"networkId":{"value":"567891234","type":"String"},"configurationId":{"value":"678912345","type":"String"},"serviceType":{"value":"testService","type":"String"},"vnfType":{"value":"testVnf","type":"String"},"vfModuleType":{"value":"vfModuleType","type":"String"},"networkType":{"value":"networkType","type":"String"},"recipeParams":{"value":"","type":"String"},"host":{"value":null,"type":"String"},"apiVersion":{"value":"6","type":"String"},"aLaCarte":{"value":true,"type":"Boolean"},"requestUri":{"value":"v7/serviceInstances/assign","type":"String"},"instanceGroupId":{"value":"ff305d54-75b4-431b-adb2-eb6b9e5ff000","type":"String"}}} \ No newline at end of file
+{
+ "variables": {
+ "bpmnRequest": {
+ "value": "{requestDetails: }",
+ "type": "String"
+ },
+ "requestId": {
+ "value": "f7ce78bb-423b-11e7-93f8-0050569a796",
+ "type": "String"
+ },
+ "mso-request-id": {
+ "value": "f7ce78bb-423b-11e7-93f8-0050569a796",
+ "type": "String"
+ },
+ "isBaseVfModule": {
+ "value": true,
+ "type": "Boolean"
+ },
+ "recipeTimeout": {
+ "value": 10000,
+ "type": "Integer"
+ },
+ "requestAction": {
+ "value": "createInstance",
+ "type": "String"
+ },
+ "serviceInstanceId": {
+ "value": "12345679",
+ "type": "String"
+ },
+ "pnfCorrelationId": {
+ "value": "12345679",
+ "type": "String"
+ },
+ "vnfId": {
+ "value": "234567891",
+ "type": "String"
+ },
+ "vfModuleId": {
+ "value": "345678912",
+ "type": "String"
+ },
+ "volumeGroupId": {
+ "value": "456789123",
+ "type": "String"
+ },
+ "networkId": {
+ "value": "567891234",
+ "type": "String"
+ },
+ "configurationId": {
+ "value": "678912345",
+ "type": "String"
+ },
+ "serviceType": {
+ "value": "testService",
+ "type": "String"
+ },
+ "vnfType": {
+ "value": "testVnf",
+ "type": "String"
+ },
+ "vfModuleType": {
+ "value": "vfModuleType",
+ "type": "String"
+ },
+ "networkType": {
+ "value": "networkType",
+ "type": "String"
+ },
+ "recipeParams": {
+ "value": "",
+ "type": "String"
+ },
+ "host": {
+ "value": null,
+ "type": "String"
+ },
+ "apiVersion": {
+ "value": "6",
+ "type": "String"
+ },
+ "aLaCarte": {
+ "value": true,
+ "type": "Boolean"
+ },
+ "requestUri": {
+ "value": "v7/serviceInstances/assign",
+ "type": "String"
+ },
+ "instanceGroupId": {
+ "value": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "type": "String"
+ },
+ "generateIdsOnly": {
+ "value": false,
+ "type": "Boolean"
+ }
+ }
+}
+
+