aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/test
diff options
context:
space:
mode:
authorJozsef Csongvai <jozsef.csongvai@bell.ca>2021-04-13 18:49:42 -0400
committerJozsef Csongvai <jozsef.csongvai@bell.ca>2021-08-04 08:47:46 -0400
commit084f025c6374249de06bf99235fd9e5b7987b933 (patch)
tree60f87c4b3cab70d238e6585335974e46cff48633 /bpmn/so-bpmn-tasks/src/test
parent872613eafe80034cca612bd93294286b3dbed4b1 (diff)
Enable ControllerExecutionBB for service scope
Also make userParams.service optional to support usecases where it is not being passed. Issue-ID: SO-3627 Change-Id: I7e0abfffe54e11935b32f6c6829400de88fb4bd0 Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test')
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListenerTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListenerTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListenerTest.java
index fdf4d36c89..b23147e351 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListenerTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListenerTest.java
@@ -37,6 +37,7 @@ import org.onap.so.bpmn.common.DelegateExecutionImpl;
import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock;
import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
import org.onap.so.db.catalog.beans.PnfResourceCustomization;
+import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.beans.VfModuleCustomization;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
import org.onap.so.db.catalog.client.CatalogDbClient;
@@ -46,6 +47,7 @@ import org.onap.so.serviceinstancebeans.RequestDetails;
@RunWith(MockitoJUnitRunner.Silent.class)
public class SkipCDSBuildingBlockListenerTest {
+ private static final String SERVICE_SCOPE = "service";
private static final String VNF_SCOPE = "VNF";
private static final String VF_SCOPE = "VFModule";
private static final String PNF_SCOPE = "pnf";
@@ -90,6 +92,18 @@ public class SkipCDSBuildingBlockListenerTest {
}
@Test
+ public void testSkipCDSforService() {
+ setBuildingBlockAndCurrentSequence(SERVICE_SCOPE, "service-config-assign", 0);
+ Service service = new Service();
+ when(catalogDbClient.getServiceByID(TEST_MODELUUID)).thenReturn(service);
+
+ skipCDSBuildingBlockListener.run(flowsToExecute, executeBuildingBlock, buildingBlockExecution);
+
+ actual = buildingBlockExecution.getVariable(BBConstants.G_CURRENT_SEQUENCE);
+ assertEquals(1, actual);
+ }
+
+ @Test
public void testProcessForVNFToSkipCDSBB() {
// given
setBuildingBlockAndCurrentSequence(VNF_SCOPE, VNF_TEST_ACTION, 0);