summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/test
diff options
context:
space:
mode:
authorBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2020-08-27 13:35:16 +0200
committerBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2020-08-27 14:17:03 +0200
commit2dec83af8abdb08d1db06afbcaec7325e098276a (patch)
tree4c90b897fc9ee6be42908aa35011bdf7f45d2a20 /csarvalidation/src/test
parent42253e812eb43110c4b49f23d13246943bb8a458 (diff)
Fix searching for path to PM_Dictionary in manifest file.
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> Change-Id: I3bf22f9095c560fa6c98e37b6d28b306e9af4d95 Issue-ID: VNFSDK-645
Diffstat (limited to 'csarvalidation/src/test')
-rw-r--r--csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745IntegrationTest.java14
-rw-r--r--csarvalidation/src/test/resources/pnf/r816745/csar-with-missing-source-value-for-pm-dictionary-in-manifest.csarbin0 -> 8793 bytes
-rw-r--r--csarvalidation/src/test/resources/pnf/r816745/csar-with-valid-pm-dictionary.csarbin8792 -> 8792 bytes
3 files changed, 14 insertions, 0 deletions
diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745IntegrationTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745IntegrationTest.java
index f171b4d..17e9de3 100644
--- a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745IntegrationTest.java
+++ b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745IntegrationTest.java
@@ -52,6 +52,20 @@ public class VTPValidateCSARR816745IntegrationTest {
}
@Test
+ public void shouldAddPmDictionaryLoadingErrorWhenPmDictionaryHaveNoSourceInManifest() throws Exception {
+ // given
+ configureTestCase(testCase, TEST_CSAR_DIRECTORY + "csar-with-missing-source-value-for-pm-dictionary-in-manifest.csar", "vtp-validate-csar-r816745.yaml", IS_PNF);
+
+ // when
+ testCase.execute();
+
+ // then
+ List<CSARArchive.CSARError> errors = testCase.getErrors();
+ assertThat(errors.size()).isEqualTo(1);
+ assertThat(convertToMessagesList(errors)).contains("Fail to load PM_Dictionary With error: onap_pm_dictionary in manifest does not contains key 'Source'");
+ }
+
+ @Test
public void shouldNotReportAnyErrorWhenCsarIsNotContainingPmDictionary() throws Exception {
// given
configureTestCase(testCase, TEST_CSAR_DIRECTORY + "csar-with-no-pm-dictionary.csar", "vtp-validate-csar-r816745.yaml", IS_PNF);
diff --git a/csarvalidation/src/test/resources/pnf/r816745/csar-with-missing-source-value-for-pm-dictionary-in-manifest.csar b/csarvalidation/src/test/resources/pnf/r816745/csar-with-missing-source-value-for-pm-dictionary-in-manifest.csar
new file mode 100644
index 0000000..cd35d37
--- /dev/null
+++ b/csarvalidation/src/test/resources/pnf/r816745/csar-with-missing-source-value-for-pm-dictionary-in-manifest.csar
Binary files differ
diff --git a/csarvalidation/src/test/resources/pnf/r816745/csar-with-valid-pm-dictionary.csar b/csarvalidation/src/test/resources/pnf/r816745/csar-with-valid-pm-dictionary.csar
index cc7db55..528a002 100644
--- a/csarvalidation/src/test/resources/pnf/r816745/csar-with-valid-pm-dictionary.csar
+++ b/csarvalidation/src/test/resources/pnf/r816745/csar-with-valid-pm-dictionary.csar
Binary files differ