diff options
Diffstat (limited to 'csarvalidation/src/test')
18 files changed, 15 insertions, 7 deletions
diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/PnfCSARArchiveTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/PnfCSARArchiveTest.java index ca85c7a..810ef0f 100644 --- a/csarvalidation/src/test/java/org/onap/cvc/csar/PnfCSARArchiveTest.java +++ b/csarvalidation/src/test/java/org/onap/cvc/csar/PnfCSARArchiveTest.java @@ -26,6 +26,8 @@ import static org.assertj.core.api.Assertions.assertThat; public class PnfCSARArchiveTest { + public static final String SOURCE_TAG = "Source"; + @Test public void shouldUseDataStoredInManifestMfFileToConfigurePnfCSARArchive() throws Exception { // given @@ -61,16 +63,16 @@ public class PnfCSARArchiveTest { private void verifyThatNonManoArtifactsWereSet(PnfCSARArchive.PnfManifest manifest) { Map<String, Map<String, List<String>>> nonManoArtifacts = manifest.getNonMano(); - assertThat(nonManoArtifacts.get("onap_ves_events").get("source")) + assertThat(nonManoArtifacts.get("onap_ves_events").get(SOURCE_TAG)) .isEqualTo(Lists.newArrayList("Artifacts/Events/VES_registration.yml") ); - assertThat(nonManoArtifacts.get("onap_pm_dictionary").get("source")) + assertThat(nonManoArtifacts.get("onap_pm_dictionary").get(SOURCE_TAG)) .isEqualTo(Lists.newArrayList("Artifacts/Measurements/PM_Dictionary.yaml") ); - assertThat(nonManoArtifacts.get("onap_yang_module").get("source")) + assertThat(nonManoArtifacts.get("onap_yang_modules").get(SOURCE_TAG)) .isEqualTo(Lists.newArrayList("Artifacts/Yang_module/Yang_module.yaml") ); - assertThat(nonManoArtifacts.get("onap_others").get("source")) + assertThat(nonManoArtifacts.get("onap_others").get(SOURCE_TAG)) .isEqualTo(Lists.newArrayList( "Artifacts/scripts/install.sh", "Artifacts/Informational/user_guide.txt", diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR146092IntegrationTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR146092IntegrationTest.java index ba51882..0e0f35d 100644 --- a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR146092IntegrationTest.java +++ b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR146092IntegrationTest.java @@ -69,7 +69,7 @@ public class VTPValidateCSARR146092IntegrationTest { assertThat(convertToMessagesList(errors)).contains( "Missing. Entry [onap_ves_events]", "Missing. Entry [onap_pm_dictionary]", - "Missing. Entry [onap_yang_module]", + "Missing. Entry [onap_yang_modules]", "Missing. Entry [onap_others]" ); } @@ -87,7 +87,7 @@ public class VTPValidateCSARR146092IntegrationTest { List<CSARArchive.CSARError> errors = testCase.getErrors(); assertThat(errors.size()).isEqualTo(1); assertThat(convertToMessagesList(errors)).contains( - "Missing. Entry [source under onap_ves_events]" + "Missing. Entry [Source under onap_ves_events]" ); } @@ -104,7 +104,7 @@ public class VTPValidateCSARR146092IntegrationTest { List<CSARArchive.CSARError> errors = testCase.getErrors(); assertThat(errors.size()).isEqualTo(1); assertThat(convertToMessagesList(errors)).contains( - "Invalid. Entry [source under onap_ves_events has invalid 'Artifacts/Deployment/Events/RadioNode.yml' path]" + "Invalid. Entry [Source under onap_ves_events has invalid 'Artifacts/Deployment/Events/RadioNode.yml' path]" ); } diff --git a/csarvalidation/src/test/resources/pnf/README.txt b/csarvalidation/src/test/resources/pnf/README.txt new file mode 100644 index 0000000..8984d6f --- /dev/null +++ b/csarvalidation/src/test/resources/pnf/README.txt @@ -0,0 +1,6 @@ +How to sign CSAR file +--------------------- +openssl req -new -nodes -x509 -keyout root-private-key.pem > root.cert +openssl req -new -nodes -keyout sample-pnf-private-key.pem > sample-pnf-request.pem +openssl x509 -req -CA root.cert -CAkey root-private-key.pem -CAcreateserial < sample-pnf-request.pem > sample-pnf.cert +openssl cms -sign -binary -nocerts -outform pem -signer sample-pnf.cert -inkey sample-pnf-private-key.pem < sample-pnf.csar > sample-pnf.cms
\ No newline at end of file diff --git a/csarvalidation/src/test/resources/pnf/dummyPnfv2.csar b/csarvalidation/src/test/resources/pnf/dummyPnfv2.csar Binary files differindex dd45b66..bf2d912 100644 --- a/csarvalidation/src/test/resources/pnf/dummyPnfv2.csar +++ b/csarvalidation/src/test/resources/pnf/dummyPnfv2.csar diff --git a/csarvalidation/src/test/resources/pnf/noToscaMetaFile.csar b/csarvalidation/src/test/resources/pnf/noToscaMetaFile.csar Binary files differindex 331da92..f01cf20 100644 --- a/csarvalidation/src/test/resources/pnf/noToscaMetaFile.csar +++ b/csarvalidation/src/test/resources/pnf/noToscaMetaFile.csar diff --git a/csarvalidation/src/test/resources/pnf/r10087/invalidChangeHistoryLog.csar b/csarvalidation/src/test/resources/pnf/r10087/invalidChangeHistoryLog.csar Binary files differindex 56b145f..f1b8ab5 100644 --- a/csarvalidation/src/test/resources/pnf/r10087/invalidChangeHistoryLog.csar +++ b/csarvalidation/src/test/resources/pnf/r10087/invalidChangeHistoryLog.csar diff --git a/csarvalidation/src/test/resources/pnf/r10087/invalidEntryDefinitionsInToscaMeta.csar b/csarvalidation/src/test/resources/pnf/r10087/invalidEntryDefinitionsInToscaMeta.csar Binary files differindex d07dcbf..beb73d8 100644 --- a/csarvalidation/src/test/resources/pnf/r10087/invalidEntryDefinitionsInToscaMeta.csar +++ b/csarvalidation/src/test/resources/pnf/r10087/invalidEntryDefinitionsInToscaMeta.csar diff --git a/csarvalidation/src/test/resources/pnf/r10087/invalidManifestFile.csar b/csarvalidation/src/test/resources/pnf/r10087/invalidManifestFile.csar Binary files differindex 83a37cb..96f3916 100644 --- a/csarvalidation/src/test/resources/pnf/r10087/invalidManifestFile.csar +++ b/csarvalidation/src/test/resources/pnf/r10087/invalidManifestFile.csar diff --git a/csarvalidation/src/test/resources/pnf/r10087/invalidTestDirectory.csar b/csarvalidation/src/test/resources/pnf/r10087/invalidTestDirectory.csar Binary files differindex b31d8cf..65fb622 100644 --- a/csarvalidation/src/test/resources/pnf/r10087/invalidTestDirectory.csar +++ b/csarvalidation/src/test/resources/pnf/r10087/invalidTestDirectory.csar diff --git a/csarvalidation/src/test/resources/pnf/r146092/missingFieldsInNonManoArtifactManifest.csar b/csarvalidation/src/test/resources/pnf/r146092/missingFieldsInNonManoArtifactManifest.csar Binary files differindex 545dd16..5f48c14 100644 --- a/csarvalidation/src/test/resources/pnf/r146092/missingFieldsInNonManoArtifactManifest.csar +++ b/csarvalidation/src/test/resources/pnf/r146092/missingFieldsInNonManoArtifactManifest.csar diff --git a/csarvalidation/src/test/resources/pnf/r146092/missingNonManoArtifactInManifest.csar b/csarvalidation/src/test/resources/pnf/r146092/missingNonManoArtifactInManifest.csar Binary files differindex 0bb0e16..f1a5055 100644 --- a/csarvalidation/src/test/resources/pnf/r146092/missingNonManoArtifactInManifest.csar +++ b/csarvalidation/src/test/resources/pnf/r146092/missingNonManoArtifactInManifest.csar diff --git a/csarvalidation/src/test/resources/pnf/r146092/noSourceElementInNonManoArtifactEntryManifest.csar b/csarvalidation/src/test/resources/pnf/r146092/noSourceElementInNonManoArtifactEntryManifest.csar Binary files differindex edeaf9b..78360dc 100644 --- a/csarvalidation/src/test/resources/pnf/r146092/noSourceElementInNonManoArtifactEntryManifest.csar +++ b/csarvalidation/src/test/resources/pnf/r146092/noSourceElementInNonManoArtifactEntryManifest.csar diff --git a/csarvalidation/src/test/resources/pnf/r146092/sourceElementWithUnknownFileInNonManoArtifactEntryManifest.csar b/csarvalidation/src/test/resources/pnf/r146092/sourceElementWithUnknownFileInNonManoArtifactEntryManifest.csar Binary files differindex 434d614..d4c7993 100644 --- a/csarvalidation/src/test/resources/pnf/r146092/sourceElementWithUnknownFileInNonManoArtifactEntryManifest.csar +++ b/csarvalidation/src/test/resources/pnf/r146092/sourceElementWithUnknownFileInNonManoArtifactEntryManifest.csar diff --git a/csarvalidation/src/test/resources/pnf/r293901/allMandatoryEntriesDefinedInTOSCAMeta.csar b/csarvalidation/src/test/resources/pnf/r293901/allMandatoryEntriesDefinedInTOSCAMeta.csar Binary files differindex f22366a..1dd4dfd 100644 --- a/csarvalidation/src/test/resources/pnf/r293901/allMandatoryEntriesDefinedInTOSCAMeta.csar +++ b/csarvalidation/src/test/resources/pnf/r293901/allMandatoryEntriesDefinedInTOSCAMeta.csar diff --git a/csarvalidation/src/test/resources/pnf/r293901/noMandatoryEntriesInTOSCAMeta.csar b/csarvalidation/src/test/resources/pnf/r293901/noMandatoryEntriesInTOSCAMeta.csar Binary files differindex 9ef56cf..70a1939 100644 --- a/csarvalidation/src/test/resources/pnf/r293901/noMandatoryEntriesInTOSCAMeta.csar +++ b/csarvalidation/src/test/resources/pnf/r293901/noMandatoryEntriesInTOSCAMeta.csar diff --git a/csarvalidation/src/test/resources/pnf/r57019/allMandatoryEntriesDefinedInMetadataManifest.csar b/csarvalidation/src/test/resources/pnf/r57019/allMandatoryEntriesDefinedInMetadataManifest.csar Binary files differindex 3311713..b23a689 100644 --- a/csarvalidation/src/test/resources/pnf/r57019/allMandatoryEntriesDefinedInMetadataManifest.csar +++ b/csarvalidation/src/test/resources/pnf/r57019/allMandatoryEntriesDefinedInMetadataManifest.csar diff --git a/csarvalidation/src/test/resources/pnf/r57019/noMandatoryEntriesInMetadataManifest.csar b/csarvalidation/src/test/resources/pnf/r57019/noMandatoryEntriesInMetadataManifest.csar Binary files differindex 6b16ed5..570693d 100644 --- a/csarvalidation/src/test/resources/pnf/r57019/noMandatoryEntriesInMetadataManifest.csar +++ b/csarvalidation/src/test/resources/pnf/r57019/noMandatoryEntriesInMetadataManifest.csar diff --git a/csarvalidation/src/test/resources/pnf/signed-package-valid-signature.zip b/csarvalidation/src/test/resources/pnf/signed-package-valid-signature.zip Binary files differindex 15437d6..b946585 100644 --- a/csarvalidation/src/test/resources/pnf/signed-package-valid-signature.zip +++ b/csarvalidation/src/test/resources/pnf/signed-package-valid-signature.zip |