diff options
Diffstat (limited to 'integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/sanity/Onboard.java')
-rw-r--r-- | integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/sanity/Onboard.java | 9 |
1 files changed, 9 insertions, 0 deletions
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 a16fa3e487..d67390e304 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 @@ -3,6 +3,7 @@ * SDC * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2021 Nokia. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +22,8 @@ package org.onap.sdc.backend.ci.tests.sanity; +import static org.testng.Assert.assertThrows; + import com.aventstack.extentreports.Status; import fj.data.Either; import org.junit.Rule; @@ -84,6 +87,12 @@ public class Onboard extends ComponentBaseTest { runOnboardToDistributionFlow(filePath, cnfFile, ResourceTypeEnum.VF); } + @Test(dataProviderClass = OnboardingDataProviders.class, dataProvider = "Invalid_CNF_List") + public void onboardCNFFlowShouldFailForInvalidHelmPackage(String filePath, String cnfFile) { + setLog(cnfFile); + assertThrows(() -> runOnboardToDistributionFlow(filePath, cnfFile, ResourceTypeEnum.VF)); + } + private void runOnboardToDistributionFlow(String packageFilePath, String packageFileName, ResourceTypeEnum resourceTypeEnum) throws Exception { ExtentTestActions.log(Status.INFO, String.format("Going to onboard the %s %s", resourceTypeEnum.getValue(), packageFileName)); User user = ElementFactory.getDefaultUser(UserRoleEnum.DESIGNER); |