summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test
diff options
context:
space:
mode:
authorpriyanshu <pagarwal@amdocs.com>2019-04-10 12:18:24 +0530
committerpriyanshu <pagarwal@amdocs.com>2019-04-10 12:20:24 +0530
commitab5c816e1578d8f0dba231e0026e5175a84c31c3 (patch)
tree017b6e114b7b22b91bc46bd6601a7ad618bd4594 /catalog-be/src/test
parentd9c0322b76c48e5f78158cb1a44da7aac9beb2a2 (diff)
Tosca artifacts - Error 500
Tosca artifacts - Error 500 - Service proxy with WF assigned Change-Id: I1d75c0b9980ab42c7c825e4423ff4994600dd6fa Issue-ID: SDC-2232 Signed-off-by: priyanshu <pagarwal@amdocs.com>
Diffstat (limited to 'catalog-be/src/test')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/tosca/utils/InterfacesOperationsToscaUtilTest.java2
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/tosca/utils/OperationArtifactUtilTest.java13
2 files changed, 7 insertions, 8 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/utils/InterfacesOperationsToscaUtilTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/utils/InterfacesOperationsToscaUtilTest.java
index 3922bc83a9..7ddf71a04a 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/utils/InterfacesOperationsToscaUtilTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/utils/InterfacesOperationsToscaUtilTest.java
@@ -192,7 +192,7 @@ public class InterfacesOperationsToscaUtilTest {
component.setInterfaces(new HashMap<>());
component.getInterfaces().put(interfaceType, addedInterface);
Map<String, Object> interfacesMap = InterfacesOperationsToscaUtil
- .getInterfacesMap(component, component.getInterfaces(), null, false, true);
+ .getInterfacesMap(component, null, component.getInterfaces(), null, false, true);
ToscaNodeType nodeType = new ToscaNodeType();
nodeType.setInterfaces(interfacesMap);
ToscaExportHandler handler = new ToscaExportHandler();
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/utils/OperationArtifactUtilTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/utils/OperationArtifactUtilTest.java
index 99988224c8..32d0acc640 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/utils/OperationArtifactUtilTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/utils/OperationArtifactUtilTest.java
@@ -33,6 +33,7 @@ import org.openecomp.sdc.be.datatypes.elements.ArtifactDataDefinition;
import org.openecomp.sdc.be.datatypes.elements.OperationDataDefinition;
import org.openecomp.sdc.be.model.ArtifactDefinition;
import org.openecomp.sdc.be.model.Component;
+import org.openecomp.sdc.be.model.ComponentInstance;
import org.openecomp.sdc.be.model.ComponentMetadataDefinition;
import org.openecomp.sdc.be.model.InterfaceDefinition;
import org.openecomp.sdc.be.model.Resource;
@@ -58,7 +59,7 @@ public class OperationArtifactUtilTest {
final ArtifactDataDefinition implementation = new ArtifactDataDefinition();
implementation.setArtifactName("createBPMN.bpmn");
op.setImplementation(implementation);
- final String actualArtifactPath = OperationArtifactUtil.createOperationArtifactPath(component, op, false);
+ final String actualArtifactPath = OperationArtifactUtil.createOperationArtifactPath(component, null, op, false);
String expectedArtifactPath = CsarUtils.ARTIFACTS + File.separator +
WordUtils.capitalizeFully(ArtifactGroupTypeEnum.DEPLOYMENT.name()) + File.separator +
ArtifactTypeEnum.WORKFLOW.name() + File.separator + BPMN_ARTIFACT_PATH + File.separator +
@@ -70,17 +71,15 @@ public class OperationArtifactUtilTest {
@Test
public void testCorrectPathForOperationArtifactsInService() {
- ResourceMetadataDataDefinition componentMetadataDataDefinition = new ResourceMetadataDataDefinition();
- componentMetadataDataDefinition.setToscaResourceName("org.openecomp.resource.vf.TestResource");
- final ComponentMetadataDefinition componentMetadataDefinition =
- new ComponentMetadataDefinition(componentMetadataDataDefinition);
- Component component = new Resource(componentMetadataDefinition);
+ Component component = new Resource();
component.setVersion("1.0");
+ ComponentInstance componentInstance = new ComponentInstance();
+ componentInstance.setToscaComponentName("org.openecomp.resource.vf.TestResource");
final OperationDataDefinition op = new OperationDataDefinition();
final ArtifactDataDefinition implementation = new ArtifactDataDefinition();
implementation.setArtifactName("createBPMN.bpmn");
op.setImplementation(implementation);
- final String actualArtifactPath = OperationArtifactUtil.createOperationArtifactPath(component, op, true);
+ final String actualArtifactPath = OperationArtifactUtil.createOperationArtifactPath(component, componentInstance, op, true);
String expectedArtifactPath = CsarUtils.ARTIFACTS + File.separator +
"org.openecomp.resource.vf.TestResource_v1.0" + File.separator +
WordUtils.capitalizeFully(ArtifactGroupTypeEnum.DEPLOYMENT.name()) + File.separator +