aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/test
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-05-20 14:17:03 +0000
committerGerrit Code Review <gerrit@onap.org>2019-05-20 14:17:03 +0000
commit65369ce83578048d8e133e79f6892a42a801be04 (patch)
treee5c323efa0ce3b8ae0d95432995a38583b03e6c3 /bpmn/MSOCommonBPMN/src/test
parent1db5881503e5b19ca9caec03068cd54828348aaf (diff)
parenta2da6120817a60ca07e1c5b417a8804b41192040 (diff)
Merge "Altered bpmn and audit behavior on delete vf mod"
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java
index 4ade9dbe32..549f16b6f6 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/client/exception/ExceptionBuilderTest.java
@@ -22,6 +22,7 @@ package org.onap.so.client.exception;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;
import org.camunda.bpm.engine.delegate.BpmnError;
@@ -131,7 +132,7 @@ public class ExceptionBuilderTest extends BaseTest {
public void processAuditExceptionTest() {
try {
Mockito.doReturn(extractPojosForBB).when(exceptionBuilder).getExtractPojosForBB();
- exceptionBuilder.processAuditException((DelegateExecutionImpl) execution);
+ exceptionBuilder.processAuditException((DelegateExecutionImpl) execution, false);
} catch (BpmnError bpmnException) {
assertEquals("AAIInventoryFailure", bpmnException.getErrorCode());
WorkflowException we = execution.getVariable("WorkflowException");
@@ -142,4 +143,19 @@ public class ExceptionBuilderTest extends BaseTest {
}
}
+ @Test
+ public void processAuditExceptionContinueTest() {
+ try {
+ Mockito.doReturn(extractPojosForBB).when(exceptionBuilder).getExtractPojosForBB();
+ exceptionBuilder.processAuditException((DelegateExecutionImpl) execution, true);
+ String sm = execution.getVariable("StatusMessage");
+ assertNotNull(sm);
+ assertEquals(
+ "create VF-Module testVfModuleId1 failed due to incomplete A&AI vserver inventory population after stack testStackName was successfully created in cloud region testLcpCloudRegionId. MSO Audit indicates that AIC RO did not create vserver testVServerId in AAI. Recommendation - Wait for nightly RO Audit to run and fix the data issue and resume vf-module creation in VID. If problem persists then report problem to AIC/RO Ops.",
+ sm);
+ } catch (BpmnError bpmnException) {
+ fail();
+ }
+ }
+
}