aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java
diff options
context:
space:
mode:
authormojahidi <mojahidul.islam@amdocs.com>2018-07-19 12:35:31 +0530
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-07-30 10:03:24 +0000
commita8480d1fec5b5696be04eb887f4cbed6b56238be (patch)
tree59f3e71a9f780e3aee6519cfda4080a4ef356729 /catalog-be/src/test/java
parent734d54df49905998d1952a8a3b1a5caf38a05fa0 (diff)
Add support for workflowId and workflowVersionId
Enhance operation data model and APIs to support workflowId and workflowVersionId Change-Id: Ib8772027a3e0147ae0bb59811a9b31fe46975ac6 Issue-ID: SDC-1535 Signed-off-by: mojahidi <mojahidul.islam@amdocs.com>
Diffstat (limited to 'catalog-be/src/test/java')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/InterfaceOperationTestUtils.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceOperationBusinessLogicTest.java9
2 files changed, 10 insertions, 1 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/InterfaceOperationTestUtils.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/InterfaceOperationTestUtils.java
index 61186f00d5..589e8be62b 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/InterfaceOperationTestUtils.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/InterfaceOperationTestUtils.java
@@ -79,6 +79,8 @@ public interface InterfaceOperationTestUtils {
implementation.setUniqueId("uniqId");
implementation.setArtifactUUID("artifactId");
operation.setImplementation(implementation);
+ operation.setWorkflowId("workflowId");
+ operation.setWorkflowVersionId("workflowVersionId");
Map<String, Operation> operationMap = new HashMap<>();
operationMap.put("op1", operation);
return operationMap;
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceOperationBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceOperationBusinessLogicTest.java
index aa71d7616c..5df58cf6d9 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceOperationBusinessLogicTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceOperationBusinessLogicTest.java
@@ -43,6 +43,7 @@ import org.openecomp.sdc.be.impl.WebAppContextWrapper;
import org.openecomp.sdc.be.model.*;
import org.openecomp.sdc.be.model.cache.ApplicationDataTypeCache;
import org.openecomp.sdc.be.model.jsontitan.operations.*;
+import org.openecomp.sdc.be.model.jsontitan.utils.InterfaceUtils;
import org.openecomp.sdc.be.model.operations.api.IElementOperation;
import org.openecomp.sdc.be.model.operations.api.IPropertyOperation;
import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus;
@@ -208,9 +209,15 @@ public class InterfaceOperationBusinessLogicTest implements InterfaceOperationTe
resourceUpdate = setUpResourceMock();
Either<Resource, ResponseFormat> interfaceOperation = bl.createInterfaceOperation(resourceId, resourceUpdate, user, true);
Assert.assertTrue(interfaceOperation.isLeft());
+ Map<String, Operation> interfaceOperationsFromInterfaces = InterfaceUtils
+ .getInterfaceOperationsFromInterfaces(interfaceOperation.left().value().getInterfaces(),
+ interfaceOperation.left().value());
+ for(Operation operation : interfaceOperationsFromInterfaces.values()) {
+ Assert.assertNotNull(operation.getWorkflowId());
+ Assert.assertNotNull(operation.getWorkflowVersionId());
+ }
}
-
@Test
public void updateInterfaceOperationTest() {
validateUserRoles(Role.ADMIN, Role.DESIGNER);