From 379eb896b050fbb1f88ca7e736665c573f8c9f74 Mon Sep 17 00:00:00 2001 From: Bogumil Zebek Date: Fri, 31 May 2019 13:58:12 +0200 Subject: Handle signature in cms Change-Id: Ied997305efe347859cbd069f2887f792adc775c0 Issue-ID: VNFSDK-414 Signed-off-by: Zebek Bogumil --- .../VTPValidateCSARR787965IntegrationTest.java | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'csarvalidation/src/test/java/org/onap/cvc/csar/cc') 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 errors = testCase.getErrors(); + assertThat(errors.size()).isEqualTo(0); + } + } \ No newline at end of file -- cgit 1.2.3-korg