summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/test/java/org
diff options
context:
space:
mode:
authorBogumil Zebek <bogumil.zebek@nokia.com>2019-04-09 11:51:50 +0200
committerZebek Bogumil <bogumil.zebek@nokia.com>2019-04-10 07:26:53 +0200
commit96fcbb323829e81abf746efc5f62763f277786b6 (patch)
tree7d14f0c8d86d2096e13798e9098c200fc91cc84f /csarvalidation/src/test/java/org
parent00e2233d95577a78c47cbabcce818191287a2a63 (diff)
Separate list of TCS
Change-Id: I15bed6fe97e2d4bc025ddcd38f8b2bd72364257a Issue-ID: AAI-391 Signed-off-by: Zebek Bogumil <bogumil.zebek@nokia.com>
Diffstat (limited to 'csarvalidation/src/test/java/org')
-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();
}