From 62f5ad6b806d0bda1bb918061a5aa4b5b4dbe8b8 Mon Sep 17 00:00:00 2001 From: "bilal.iqbal" Date: Mon, 25 Mar 2019 14:31:14 +0000 Subject: Change SOL004 baseline from v2.5.1 to v2.6.1 Change-Id: Ic524e25a5f0a9952dd0a2c578034c60e51c7a290 Issue-ID: SDC-2190 Signed-off-by: bilal.iqbal --- .../java/org/openecomp/sdc/tosca/csar/ManifestParsingTest.java | 6 ++++++ .../java/org/openecomp/sdc/tosca/csar/MetadataParsingTest.java | 8 ++++---- .../test/resources/vspmanager.csar/metadata/ValidETSItosca.meta | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/test') diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/csar/ManifestParsingTest.java b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/csar/ManifestParsingTest.java index 2e8a1ecbd0..b083cfad3a 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/csar/ManifestParsingTest.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/csar/ManifestParsingTest.java @@ -18,9 +18,11 @@ package org.openecomp.sdc.tosca.csar; import org.junit.Before; import org.junit.Test; +import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum; import org.openecomp.sdc.common.errors.Messages; import java.io.IOException; import java.io.InputStream; +import java.util.Optional; import static junit.framework.TestCase.assertTrue; import static org.junit.Assert.assertEquals; @@ -44,6 +46,10 @@ public class ManifestParsingTest { assertTrue(manifest.isValid()); assertEquals(manifest.getMetadata().size(), 4); assertEquals(manifest.getSources().size(), 5); + Optional resourceTypeEnum = manifest.getType(); + if(resourceTypeEnum.isPresent()){ + assertTrue(resourceTypeEnum.get() == ResourceTypeEnum.VF); + } } } diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/csar/MetadataParsingTest.java b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/csar/MetadataParsingTest.java index 5e32820bc3..4519ee7bd3 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/csar/MetadataParsingTest.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/csar/MetadataParsingTest.java @@ -4,9 +4,9 @@ package org.openecomp.sdc.tosca.csar; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; -import static org.openecomp.sdc.tosca.csar.CSARConstants.TOSCA_META_ENTRY_CHANGE_LOG; +import static org.openecomp.sdc.tosca.csar.CSARConstants.TOSCA_META_ETSI_ENTRY_CHANGE_LOG; import static org.openecomp.sdc.tosca.csar.CSARConstants.TOSCA_META_ENTRY_DEFINITIONS; -import static org.openecomp.sdc.tosca.csar.CSARConstants.TOSCA_META_ENTRY_MANIFEST; +import static org.openecomp.sdc.tosca.csar.CSARConstants.TOSCA_META_ETSI_ENTRY_MANIFEST; import java.io.IOException; import java.io.InputStream; @@ -61,8 +61,8 @@ public class MetadataParsingTest { .getResourceAsStream("/vspmanager.csar/metadata/ValidETSItosca.meta")) { ToscaMetadata onboardingToscaMetadata = OnboardingToscaMetadata.parseToscaMetadataFile(is); assertEquals(onboardingToscaMetadata.getMetaEntries().get(TOSCA_META_ENTRY_DEFINITIONS), "Definitions/MainServiceTemplate.yaml"); - assertEquals(onboardingToscaMetadata.getMetaEntries().get(TOSCA_META_ENTRY_MANIFEST), "MainServiceTemplate.mf"); - assertEquals(onboardingToscaMetadata.getMetaEntries().get(TOSCA_META_ENTRY_CHANGE_LOG), "change.log"); + assertEquals(onboardingToscaMetadata.getMetaEntries().get(TOSCA_META_ETSI_ENTRY_MANIFEST), "MainServiceTemplate.mf"); + assertEquals(onboardingToscaMetadata.getMetaEntries().get(TOSCA_META_ETSI_ENTRY_CHANGE_LOG), "change.log"); } } diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/vspmanager.csar/metadata/ValidETSItosca.meta b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/vspmanager.csar/metadata/ValidETSItosca.meta index 0d74a150b1..8a51a625f2 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/vspmanager.csar/metadata/ValidETSItosca.meta +++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/vspmanager.csar/metadata/ValidETSItosca.meta @@ -2,5 +2,5 @@ TOSCA-Meta-File-Version: 1.0 CSAR-Version: 1.1 Created-By: Sergey Sachkov Entry-Definitions: Definitions/MainServiceTemplate.yaml -Entry-Manifest: MainServiceTemplate.mf -Entry-Change-Log: change.log +ETSI-Entry-Manifest: MainServiceTemplate.mf +ETSI-Entry-Change-Log: change.log -- cgit 1.2.3-korg