From 6e2234ce6ee4492ba65dead0329e2a24fe1a75c3 Mon Sep 17 00:00:00 2001 From: kjaniak Date: Mon, 17 Feb 2020 23:04:25 +0100 Subject: Fix for not running tests Junit5 version lowered. 5.6.0 Junit5 has issues with maven-surefire-plugin Issue-ID: AAF-996 Signed-off-by: kjaniak Change-Id: I17489f106d42d4c0b66d8f68ef500fba2b68f261 --- certService/pom.xml | 59 ++-------------- certServiceClient/pom.xml | 21 +++--- .../certservice/client/CertServiceClientApp.java | 1 - .../client/CertServiceClientAppTest.java | 1 + pom.xml | 80 +++++++++++++++++++--- 5 files changed, 90 insertions(+), 72 deletions(-) diff --git a/certService/pom.xml b/certService/pom.xml index a8a5296c..51588f16 100644 --- a/certService/pom.xml +++ b/certService/pom.xml @@ -74,67 +74,18 @@ org.springframework.boot spring-boot-maven-plugin - - - - repackage - - - - pre-integration-test - - start - - - - post-integration-test - - stop - - - + org.apache.maven.plugins + maven-surefire-plugin + + + org.apache.maven.plugins maven-javadoc-plugin - - true - false - false - ${java.home}/bin/javadoc - - - - aggregate - site - - aggregate - - - - attach-javadoc - - jar - - - org.springdoc springdoc-openapi-maven-plugin - ${springdoc-openapi-maven-plugin.version} - - - integration-test - - generate - - - - - ${springdoc-openapi-maven-plugin.apiDocsUrl} - api-docs.json - ${project.build.directory} - diff --git a/certServiceClient/pom.xml b/certServiceClient/pom.xml index 2b4f2d02..2f3aa62e 100644 --- a/certServiceClient/pom.xml +++ b/certServiceClient/pom.xml @@ -16,26 +16,29 @@ jar - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - - + + + org.apache.maven.plugins + maven-surefire-plugin + + + org.junit.jupiter junit-jupiter-engine + + org.junit.jupiter + junit-jupiter-api + org.assertj assertj-core + diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/CertServiceClientApp.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/CertServiceClientApp.java index f3b1c0f3..8b200be3 100644 --- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/CertServiceClientApp.java +++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/CertServiceClientApp.java @@ -23,6 +23,5 @@ package org.onap.aaf.certservice.client; public class CertServiceClientApp { public static void main(String[] args) { - System.exit(0); } } \ No newline at end of file diff --git a/certServiceClient/src/test/java/org/onap/aaf/certservice/client/CertServiceClientAppTest.java b/certServiceClient/src/test/java/org/onap/aaf/certservice/client/CertServiceClientAppTest.java index a79095c4..e9d169a0 100644 --- a/certServiceClient/src/test/java/org/onap/aaf/certservice/client/CertServiceClientAppTest.java +++ b/certServiceClient/src/test/java/org/onap/aaf/certservice/client/CertServiceClientAppTest.java @@ -22,6 +22,7 @@ package org.onap.aaf.certservice.client; import org.junit.jupiter.api.Test; class CertServiceClientAppTest { + // Sonar check for this test disabled due to lack of assertion in test. // Intention of this test is to check if app runs without exiting Java. @Test diff --git a/pom.xml b/pom.xml index 6c20bb45..38dfc9f3 100644 --- a/pom.xml +++ b/pom.xml @@ -52,7 +52,7 @@ 0.2 2.8.6 0.33.0 - 5.6.0 + 5.5.2 true @@ -74,14 +74,73 @@ + + org.springdoc + springdoc-openapi-maven-plugin + ${springdoc-openapi-maven-plugin.version} + + + integration-test + + generate + + + + + ${springdoc-openapi-maven-plugin.apiDocsUrl} + api-docs.json + ${project.build.directory} + + org.springframework.boot spring-boot-maven-plugin ${spring-boot-starter.version} + + + + repackage + + + + pre-integration-test + + start + + + + post-integration-test + + stop + + + + org.apache.maven.plugins maven-javadoc-plugin ${maven-javadoc-plugin.version} + + true + false + false + ${java.home}/bin/javadoc + + + + aggregate + site + + aggregate + + + + attach-javadoc + + jar + + + org.apache.maven.plugins @@ -175,7 +234,12 @@ - + + org.assertj + assertj-core + ${assertj-core.version} + test + org.junit.jupiter junit-jupiter-engine @@ -183,15 +247,15 @@ test - org.mockito - mockito-core - ${mockito-core.version} + org.junit.jupiter + junit-jupiter-api + ${junit.version} test - org.assertj - assertj-core - ${assertj-core.version} + org.mockito + mockito-core + ${mockito-core.version} test -- cgit 1.2.3-korg