From 96fcbb323829e81abf746efc5f62763f277786b6 Mon Sep 17 00:00:00 2001 From: Bogumil Zebek Date: Tue, 9 Apr 2019 11:51:50 +0200 Subject: Separate list of TCS Change-Id: I15bed6fe97e2d4bc025ddcd38f8b2bd72364257a Issue-ID: AAI-391 Signed-off-by: Zebek Bogumil --- .../java/org/onap/cvc/csar/CsarValidatorTest.java | 32 ++++++++++++++++++---- .../cvc/csar/cc/sol004/IntegrationTestUtils.java | 4 +-- 2 files changed, 28 insertions(+), 8 deletions(-) (limited to 'csarvalidation/src/test/java/org') diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/CsarValidatorTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/CsarValidatorTest.java index f7b64d1..c441b80 100644 --- a/csarvalidation/src/test/java/org/onap/cvc/csar/CsarValidatorTest.java +++ b/csarvalidation/src/test/java/org/onap/cvc/csar/CsarValidatorTest.java @@ -16,18 +16,38 @@ package org.onap.cvc.csar; -import static org.junit.Assert.assertEquals; - -import java.io.IOException; - import org.junit.Test; import org.onap.cli.main.OnapCli; +import java.net.URISyntaxException; + +import static org.junit.Assert.assertEquals; +import static org.onap.cvc.csar.cc.sol004.IntegrationTestUtils.absoluteFilePath; + + public class CsarValidatorTest { + + @Test + public void testAllTestCasesForVNF() throws URISyntaxException { + OnapCli cli = new OnapCli(new String [] { + "--product", "onap-vtp", + "csar-validate", + "--format", "json", + "--csar", absoluteFilePath("VoLTE.csar")}); + cli.handle(); + assertEquals(0, cli.getExitCode()); + } + + @Test - public void testAll() throws IOException, InterruptedException { - OnapCli cli = new OnapCli(new String [] {"--product", "onap-vtp", "csar-validate", "--format", "json", "--csar", "./src/test/resources/VoLTE.csar"}); + public void testAllTestCasesForPNF() throws URISyntaxException { + OnapCli cli = new OnapCli(new String [] { + "--product", "onap-vtp", + "csar-validate", + "--format", "json", + "--pnf", + "--csar", absoluteFilePath("pnf/r57019/allMandatoryEntriesDefinedInMetadataManifest.csar")}); cli.handle(); assertEquals(0, cli.getExitCode()); } diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/IntegrationTestUtils.java b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/IntegrationTestUtils.java index 32ac187..5e1c836 100644 --- a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/IntegrationTestUtils.java +++ b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/IntegrationTestUtils.java @@ -31,13 +31,13 @@ import java.util.List; import java.util.Set; import java.util.stream.Collectors; -class IntegrationTestUtils { +public class IntegrationTestUtils { private IntegrationTestUtils() { } - private static String absoluteFilePath(String relativeFilePath) throws URISyntaxException { + public static String absoluteFilePath(String relativeFilePath) throws URISyntaxException { return VTPValidatePnfCSARBase.class.getClassLoader().getResource(relativeFilePath) .toURI().getPath(); } -- cgit 1.2.3-korg