summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'csarvalidation/src/test')
-rw-r--r--csarvalidation/src/test/java/org/onap/cvc/csar/CsarValidatorTest.java32
-rw-r--r--csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/IntegrationTestUtils.java4
2 files changed, 28 insertions, 8 deletions
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();
}