summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/test/java
diff options
context:
space:
mode:
authorChan, Mercy <merce.chan@att.com>2019-08-29 16:12:22 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-08-29 16:12:22 -0400
commitf0dc8623294868179f1264a6ef80980dd990a313 (patch)
tree5d7639239a4690b3236c3ef1040a251186ac469c /mso-api-handlers/mso-api-handler-infra/src/test/java
parenteb3835986cec920c7add691fc9233e4be7c238cc (diff)
added fix for missing Error from SDNC prefix
added fix for missing Error from SDNC prefix to SDNC callback flow reverted implementation from bpmn-tasks package and moved them to apih side, added junit test renamed error message constant, removed regex check, add error message porefix directly to actual message Issue-ID: SO-2267 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I440cf9eff12571f576fcc5f2d28d9f2c8130e4b6
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/test/java')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java
index f672648a6b..627bbc631d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsUnitTest.java
@@ -25,6 +25,7 @@ import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.doReturn;
import javax.ws.rs.core.Response;
import org.apache.commons.lang.StringUtils;
@@ -232,6 +233,21 @@ public class OrchestrationRequestsUnitTest {
}
@Test
+ public void mapRequestStatusAndExtSysErrSrcToRequestErrorMessageTest() throws ApiException {
+ InstanceReferences instanceReferences = new InstanceReferences();
+ instanceReferences.setServiceInstanceId(SERVICE_INSTANCE_ID);
+ iar.setExtSystemErrorSource(ROLLBACK_EXT_SYSTEM_ERROR_SOURCE);
+ iar.setFlowStatus(null);
+ iar.setStatusMessage("Error retrieving cloud region from AAI");
+
+ Request actual = orchestrationRequests.mapInfraActiveRequestToRequest(iar, includeCloudRequest,
+ OrchestrationRequestFormat.DETAIL.toString());
+
+ assertTrue(actual.getRequestStatus().getStatusMessage()
+ .contains("Error Source: " + ROLLBACK_EXT_SYSTEM_ERROR_SOURCE));
+ }
+
+ @Test
public void mapRequestStatusAndExtSysErrSrcToRequestFlowStatusSuccessfulCompletionTest() throws ApiException {
InstanceReferences instanceReferences = new InstanceReferences();
instanceReferences.setServiceInstanceId(SERVICE_INSTANCE_ID);