diff options
Diffstat (limited to 'csarvalidation/src/test/java/org')
-rw-r--r-- | csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR130206IntegrationTest.java | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR130206IntegrationTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR130206IntegrationTest.java index feabe7f..0147c90 100644 --- a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR130206IntegrationTest.java +++ b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR130206IntegrationTest.java @@ -80,6 +80,22 @@ public class VTPValidateCSARR130206IntegrationTest { assertThat(errors.size()).isEqualTo(0); } + @Test + public void shouldReportWarningForMissingCMSAndHashCodes() throws Exception{ + // given + configureTestCase(testCase, "pnf/r130206/csar-option1-warning.csar", "vtp-validate-csar-r130206.yaml", IS_PNF); + + // when + testCase.execute(); + + // then + List<CSARArchive.CSARError> errors = testCase.getErrors(); + assertThat(errors.size()).isEqualTo(1); + assertThat(convertToMessagesList(errors)).contains( + "Warning. Consider adding security options (CMS and hash codes for sources) in manifest file." + ); + } + @Test public void shouldReportThatOnlySignatureIsInvalid() throws Exception { @@ -135,14 +151,14 @@ public class VTPValidateCSARR130206IntegrationTest { List<CSARArchive.CSARError> errors = testCase.getErrors(); assertThat(convertToMessagesList(errors)).contains( "Unable to find cert file defined by Entry-Certificate!", - "Unable to find CMS section in manifest!", + "Warning. Consider adding security options (CMS and hash codes for sources) in manifest file.", "Missing. Entry [tosca_definitions_version]" ); } @Test - public void shouldReportThanInVnfPackageETSIFileIsMissingAndNoCertificateInCMS() throws Exception { + public void shouldReportThanInVnfPackageETSIFileIsMissing() throws Exception { // given configureTestCase(testCase, "pnf/r130206/csar-with-no-certificate.csar", "vtp-validate-csar-r130206.yaml", IS_PNF); @@ -154,7 +170,7 @@ public class VTPValidateCSARR130206IntegrationTest { List<CSARArchive.CSARError> errors = testCase.getErrors(); assertThat(convertToMessagesList(errors)).contains( "Unable to find cert file defined by ETSI-Entry-Certificate!", - "Unable to find CMS section in manifest!" + "Warning. Consider adding security options (CMS and hash codes for sources) in manifest file." ); } |