summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/test/java
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2020-07-07 15:57:21 +0000
committerGerrit Code Review <gerrit@onap.org>2020-07-07 15:57:21 +0000
commit05d5b97f40d72c494ad95152a31ec8b931db94eb (patch)
tree661e3aeb3d56f85f918b2700c242d72342b805e3 /bpmn/so-bpmn-tasks/src/test/java
parentaf108bdcc19cdc2cf06dacdd0705ec408bfd4910 (diff)
parent2db4b6c011703e68fd4da3ef231bbc7aeb54b7c1 (diff)
Merge "Do not edit calling argument"
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test/java')
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java52
1 files changed, 52 insertions, 0 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java
index b538718bd0..1aa7640492 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasksTest.java
@@ -44,7 +44,9 @@ import org.onap.so.bpmn.BaseTaskTest;
import org.onap.so.bpmn.common.listener.flowmanipulator.FlowManipulatorListenerRunner;
import org.onap.so.bpmn.core.WorkflowException;
import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlock;
+import org.onap.so.bpmn.servicedecomposition.entities.ConfigurationResourceKeys;
import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
+import org.onap.so.bpmn.servicedecomposition.entities.WorkflowResourceIds;
import org.onap.so.db.catalog.beans.VnfResourceCustomization;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.serviceinstancebeans.ModelInfo;
@@ -53,6 +55,7 @@ import org.springframework.core.env.Environment;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -528,6 +531,55 @@ public class WorkflowActionBBTasksTest extends BaseTaskTest {
assertEquals(2, ebbs.size());
}
+ @Test
+ public void postProcessingExecuteBBActivateVfModuleTest() throws CloneNotSupportedException {
+ BuildingBlock bbActivateVfModule = new BuildingBlock().setBpmnFlowName("ActivateVfModuleBB");
+ ExecuteBuildingBlock ebbActivateVfModule = new ExecuteBuildingBlock().setBuildingBlock(bbActivateVfModule);
+
+ WorkflowResourceIds resourceIdsActivateVfModule = new WorkflowResourceIds();
+ resourceIdsActivateVfModule.setServiceInstanceId("test-service-inbstance-id");
+ resourceIdsActivateVfModule.setVnfId("test-vnf-id");
+ resourceIdsActivateVfModule.setVfModuleId("test-vf-module-id");
+ resourceIdsActivateVfModule.setConfigurationId("");
+
+ RequestDetails requestDetails = new RequestDetails();
+
+ ebbActivateVfModule.setApiVersion("7");
+ ebbActivateVfModule.setaLaCarte(true);
+ ebbActivateVfModule.setRequestAction("createInstance");
+ ebbActivateVfModule.setVnfType("test-vnf-type");
+ ebbActivateVfModule.setRequestId("f6c00ae2-a205-4cbd-b055-02e553efde12");
+ ebbActivateVfModule.setRequestDetails(requestDetails);
+ ebbActivateVfModule.setWorkflowResourceIds(resourceIdsActivateVfModule);
+
+ ConfigurationResourceKeys configurationResourceKeys = new ConfigurationResourceKeys();
+ configurationResourceKeys.setCvnfcCustomizationUUID("07d64cd2-4427-4156-b11d-d14b96b3e4cb");
+ configurationResourceKeys.setVfModuleCustomizationUUID("50b61075-6ebb-4aab-a9fc-bedad9a2aa76");
+ configurationResourceKeys.setVnfResourceCustomizationUUID("a1d0e36e-34a9-431b-b5ba-4bbb72f63c7c");
+ configurationResourceKeys.setVnfcName("rdm54bvbgw5001vm018pim001");
+
+ ExecuteBuildingBlock ebbAddFabricConfig =
+ workflowActionBBTasks.getExecuteBBForConfig("AddFabricConfigurationBB", ebbActivateVfModule,
+ "cc7e12f9-967c-4362-8d14-e5b2bf0608a4", configurationResourceKeys);
+
+ assertEquals("7", ebbAddFabricConfig.getApiVersion());
+ assertTrue(ebbAddFabricConfig.isaLaCarte());
+ assertEquals("createInstance", ebbAddFabricConfig.getRequestAction());
+ assertEquals("test-vnf-type", ebbAddFabricConfig.getVnfType());
+ assertEquals("f6c00ae2-a205-4cbd-b055-02e553efde12", ebbAddFabricConfig.getRequestId());
+ assertEquals(requestDetails, ebbAddFabricConfig.getRequestDetails());
+ assertEquals("cc7e12f9-967c-4362-8d14-e5b2bf0608a4",
+ ebbAddFabricConfig.getWorkflowResourceIds().getConfigurationId());
+ assertEquals("test-service-inbstance-id", ebbAddFabricConfig.getWorkflowResourceIds().getServiceInstanceId());
+ assertEquals("test-vnf-id", ebbAddFabricConfig.getWorkflowResourceIds().getVnfId());
+ assertEquals("test-vf-module-id", ebbAddFabricConfig.getWorkflowResourceIds().getVfModuleId());
+
+ assertThat(ebbAddFabricConfig.getConfigurationResourceKeys()).isEqualTo(configurationResourceKeys);
+ assertThat(ebbAddFabricConfig.getWorkflowResourceIds())
+ .isNotEqualTo(ebbActivateVfModule.getWorkflowResourceIds());
+ assertThat(ebbAddFabricConfig.getWorkflowResourceIds().getConfigurationId())
+ .isNotEqualTo(ebbActivateVfModule.getWorkflowResourceIds().getConfigurationId());
+ }
@Test
public void checkRetryStatusTest() {