From 55401bf89a8bc1c51f76554faac278186560724a Mon Sep 17 00:00:00 2001 From: franciscovila Date: Fri, 4 Feb 2022 10:47:33 +0000 Subject: Create onboarding validator for ASD VSPs Create a new validator in SDC onboarding that will be used for ASD VSPs Issue-ID: SDC-3859 Signed-off-by: franciscovila Change-Id: Ida192122a95414f7d18855fe2a993b269c55a91d --- .../backend/ci/tests/data/providers/OnboardingDataProviders.java | 6 ++++++ .../onap/sdc/backend/ci/tests/datatypes/enums/PackageTypeEnum.java | 3 ++- .../src/test/java/org/onap/sdc/backend/ci/tests/sanity/Onboard.java | 6 ++++++ .../org/onap/sdc/backend/ci/tests/utils/general/FileHandling.java | 5 ++++- 4 files changed, 18 insertions(+), 2 deletions(-) (limited to 'integration-tests/src/test/java/org') diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/data/providers/OnboardingDataProviders.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/data/providers/OnboardingDataProviders.java index 10d7b38899..e84256fbc6 100644 --- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/data/providers/OnboardingDataProviders.java +++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/data/providers/OnboardingDataProviders.java @@ -72,6 +72,12 @@ public final class OnboardingDataProviders { FileHandling.getPackageRepositoryPath(PackageTypeEnum.PNF)); } + @DataProvider(name = "ASD_List", parallel = true) + private static Object[][] asdList() { + return provideData(OnboardingUtils.getXnfNamesFileList(PackageTypeEnum.ASD), + FileHandling.getPackageRepositoryPath(PackageTypeEnum.ASD)); + } + @DataProvider(name = "CNF_List", parallel = true) private static Object[][] cnfList() { final List fileNamesFromFolder = OnboardingUtils.getXnfNamesFileList(PackageTypeEnum.CNF); diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/datatypes/enums/PackageTypeEnum.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/datatypes/enums/PackageTypeEnum.java index 0e67cdaeb9..99c2670161 100644 --- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/datatypes/enums/PackageTypeEnum.java +++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/datatypes/enums/PackageTypeEnum.java @@ -32,7 +32,8 @@ public enum PackageTypeEnum { ETSI("ETSI"), PNF("PNF"), VFC("VFC"), - VNF("VNF"); + VNF("VNF"), + ASD("ASD"); private String value; } diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/sanity/Onboard.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/sanity/Onboard.java index a3323b98d3..a0600f9995 100644 --- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/sanity/Onboard.java +++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/sanity/Onboard.java @@ -81,6 +81,12 @@ public class Onboard extends ComponentBaseTest { runOnboardToDistributionFlow(filePath, pnfFile, ResourceTypeEnum.PNF); } + @Test(dataProviderClass = OnboardingDataProviders.class, dataProvider = "ASD_List") + public void onboardASDFlow(String filePath, String asdFile) throws Exception { + setLog(asdFile); + runOnboardToDistributionFlow(filePath, asdFile, ResourceTypeEnum.VF); + } + @Test(dataProviderClass = OnboardingDataProviders.class, dataProvider = "CNF_List") public void onboardCNFFlow(String filePath, String cnfFile) throws Exception { setLog(cnfFile); diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/general/FileHandling.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/general/FileHandling.java index 81ca398813..3cc8e26e15 100644 --- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/general/FileHandling.java +++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/general/FileHandling.java @@ -138,7 +138,8 @@ public class FileHandling { PackageTypeEnum.CNF_HELM, getCnfRepositoryForHelmValidatorPath(), PackageTypeEnum.VNF, getVnfRepositoryPath(), PackageTypeEnum.ETSI, getEtsiRepositoryPath(), - PackageTypeEnum.VFC, getVfcRepositoryPath() + PackageTypeEnum.VFC, getVfcRepositoryPath(), + PackageTypeEnum.ASD, getAsdRepositoryPath() )); public static String getVnfRepositoryPath() { @@ -159,6 +160,8 @@ public class FileHandling { private static String getEtsiRepositoryPath() { return getFilePath("ETSI"); } + private static String getAsdRepositoryPath() { return getFilePath("ASDs"); } + private static String getVfcRepositoryPath() { return getFilePath("VFCs"); } public static String getPackageRepositoryPath(PackageTypeEnum packageTypeEnum) { -- cgit 1.2.3-korg