summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/test/java')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/components/csar/CsarInfoTest.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/csar/CsarInfoTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/csar/CsarInfoTest.java
index a28e2efcdb..f3f0ab5628 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/csar/CsarInfoTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/csar/CsarInfoTest.java
@@ -38,7 +38,7 @@ import org.openecomp.sdc.common.impl.ExternalConfiguration;
import org.openecomp.sdc.common.impl.FSConfigurationSource;
import org.openecomp.sdc.common.zip.ZipUtils;
import org.openecomp.sdc.common.zip.exception.ZipException;
-
+import com.datastax.oss.driver.shaded.guava.common.collect.Lists;
import java.io.File;
import java.net.URISyntaxException;
import java.util.Arrays;
@@ -167,4 +167,16 @@ public class CsarInfoTest {
assertTrue(csarInfo.extractNodeTypesInfo().isEmpty());
}
+
+ @Test
+ public void testCreateCsarInfoVnfWithNodeTypeInGlobalSub() throws URISyntaxException, ZipException {
+ final CsarInfo csarInfo = createCsarInfo("nodeTypeInGlobalSub.csar", "Definitions/MainServiceTemplate.yaml");
+
+ assertEquals(1, csarInfo.extractNodeTypesInfo().size());
+ final NodeTypeInfo nodeTypeInfo = csarInfo.extractNodeTypesInfo().get("tosca.nodes.l3vpn");
+ assertNotNull(nodeTypeInfo);
+ assertEquals("Definitions/GlobalSubstitutionTypesServiceTemplate.yaml", nodeTypeInfo.getTemplateFileName());
+ assertEquals("tosca.nodes.l3vpn", nodeTypeInfo.getType());
+ assertEquals(Lists.newArrayList("tosca.nodes.Root"), nodeTypeInfo.getDerivedFrom());
+ }
}