summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/test
diff options
context:
space:
mode:
authorBogumil Zebek <bogumil.zebek@nokia.com>2020-05-18 08:33:00 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-18 08:33:00 +0000
commitd6e34605e0e961920327ff4f878e2fb2e99a5d9c (patch)
treebd36477375beca7ce9f62f2a75d9f756efd85ad6 /csarvalidation/src/test
parentbcaab76906b642de056e4aea97548f0f5bd90e44 (diff)
parent497835a9faf9ec947af69a8e1c48f02ce7376fcd (diff)
Merge "Fix R972082 bug"
Diffstat (limited to 'csarvalidation/src/test')
-rw-r--r--csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR972082IntegrationTest.java21
-rw-r--r--csarvalidation/src/test/resources/pnf/r972082/missingOnapPnfSwInformationArtifactSetEntry.csarbin0 -> 116517 bytes
2 files changed, 9 insertions, 12 deletions
diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR972082IntegrationTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR972082IntegrationTest.java
index 48b2d6e..66937d4 100644
--- a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR972082IntegrationTest.java
+++ b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR972082IntegrationTest.java
@@ -61,28 +61,25 @@ public class VTPValidateCSARR972082IntegrationTest {
}
@Test
- public void shouldReportThatEntryHasInvalidPathWhenYamlFileIsNotPresent() throws Exception {
+ public void shouldReturnNoErrorWhenOptionalNonManoArtifactSetEntryIsNotPresent() throws Exception {
// given
- configureTestCase(testCase, PNF_R_972082 + "missingYamlFileReferedInSourceSessionOfManifest.csar",
- VTP_VALIDATE_CSAR_R_972082_YAML,
- IS_PNF);
+ configureTestCase(testCase, PNF_R_972082 + "missingOnapPnfSwInformationArtifactSetEntry.csar",
+ VTP_VALIDATE_CSAR_R_972082_YAML, IS_PNF);
// when
testCase.execute();
// then
final List<CSARError> errors = testCase.getErrors();
- assertThat(errors.size()).isEqualTo(1);
- assertThat(convertToMessagesList(errors)).contains(
- "Invalid. Entry [Source under onap_pnf_sw_information has invalid 'Files/pnf-sw-information/pnf-sw-information.yaml' path]"
- );
+ assertThat(errors.size()).isEqualTo(0);
}
@Test
- public void shouldReportThatMandatoryNonManoArtifactSetEntryHasNotAllFields_() throws Exception {
+ public void shouldReportThatEntryHasInvalidPathWhenYamlFileIsNotPresent() throws Exception {
// given
- configureTestCase(testCase, PNF_R_972082 + "missingFieldsInNonManoArtifactManifest.csar",
- VTP_VALIDATE_CSAR_R_972082_YAML, IS_PNF);
+ configureTestCase(testCase, PNF_R_972082 + "missingYamlFileReferedInSourceSessionOfManifest.csar",
+ VTP_VALIDATE_CSAR_R_972082_YAML,
+ IS_PNF);
// when
testCase.execute();
@@ -91,7 +88,7 @@ public class VTPValidateCSARR972082IntegrationTest {
final List<CSARError> errors = testCase.getErrors();
assertThat(errors.size()).isEqualTo(1);
assertThat(convertToMessagesList(errors)).contains(
- "Missing. Entry [[onap_pnf_sw_information]]"
+ "Invalid. Entry [Source under onap_pnf_sw_information has invalid 'Files/pnf-sw-information/pnf-sw-information.yaml' path]"
);
}
diff --git a/csarvalidation/src/test/resources/pnf/r972082/missingOnapPnfSwInformationArtifactSetEntry.csar b/csarvalidation/src/test/resources/pnf/r972082/missingOnapPnfSwInformationArtifactSetEntry.csar
new file mode 100644
index 0000000..518aaa8
--- /dev/null
+++ b/csarvalidation/src/test/resources/pnf/r972082/missingOnapPnfSwInformationArtifactSetEntry.csar
Binary files differ