diff options
author | Bogumil Zebek <bogumil.zebek@nokia.com> | 2019-05-31 13:58:12 +0200 |
---|---|---|
committer | Zebek Bogumil <bogumil.zebek@nokia.com> | 2019-05-31 13:58:12 +0200 |
commit | 379eb896b050fbb1f88ca7e736665c573f8c9f74 (patch) | |
tree | 5bdd21ed80f11f8c6807cd6fc0fe40b713d9f81e /csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR787965IntegrationTest.java | |
parent | 2b293e3d6c9c2ff693ccebf8ee757980cf6e2499 (diff) |
Handle signature in cms
Change-Id: Ied997305efe347859cbd069f2887f792adc775c0
Issue-ID: VNFSDK-414
Signed-off-by: Zebek Bogumil <bogumil.zebek@nokia.com>
Diffstat (limited to 'csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR787965IntegrationTest.java')
-rw-r--r-- | csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR787965IntegrationTest.java | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR787965IntegrationTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR787965IntegrationTest.java index 5c11c8a..c19fe99 100644 --- a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR787965IntegrationTest.java +++ b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR787965IntegrationTest.java @@ -43,12 +43,10 @@ public class VTPValidateCSARR787965IntegrationTest { } @Test - public void shouldReportCsarHasInvalidSignature() throws Exception { - // We will not prepare positive test case, because X509 certification has expiration date and such test will - // stop working in the future. + public void shouldReportThatCsarHasInvalidSignature() throws Exception { // given - configureTestCase(testCase, "pnf/signed-package.zip"); + configureTestCase(testCase, "pnf/signed-package-invalid-signature.zip"); // when testCase.execute(); @@ -61,5 +59,19 @@ public class VTPValidateCSARR787965IntegrationTest { ); } + @Test + public void shouldDoNotReportAnyErrorWhenPackageHasValidSignature() throws Exception { + + // given + configureTestCase(testCase, "pnf/signed-package-valid-signature.zip"); + + // when + testCase.execute(); + + // then + List<CSARArchive.CSARError> errors = testCase.getErrors(); + assertThat(errors.size()).isEqualTo(0); + } + }
\ No newline at end of file |