Fix unit tests not running 40/106340/6
authorBaumel, Dvir (db384r) <dvir.baumel@intl.att.com>
Tue, 21 Apr 2020 11:14:15 +0000 (14:14 +0300)
committerOfir Sonsino <ofir.sonsino@intl.att.com>
Wed, 22 Apr 2020 13:27:18 +0000 (13:27 +0000)
Change-Id: I06462b6180a1f1a310aae994f4e703a498f80247
Issue-ID: SDC-2933
Signed-off-by: Baumel, Dvir (db384r) <dvir.baumel@intl.att.com>
catalog-be/src/test/java/org/openecomp/sdc/be/components/merge/input/ComponentInputsMergeBLTest.java
onboarding/pom.xml
pom.xml
utils/DmaapPublisher/pom.xml
utils/webseal-simulator/pom.xml

index 9868e66..b1fa558 100644 (file)
@@ -23,7 +23,6 @@ package org.openecomp.sdc.be.components.merge.input;
 import fj.data.Either;
 import org.junit.Before;
 import org.junit.Test;
-import org.junit.jupiter.api.DisplayName;
 import org.mockito.Mockito;
 import org.openecomp.sdc.be.auditing.impl.AuditingManager;
 import org.openecomp.sdc.be.components.utils.ObjectGenerator;
@@ -61,7 +60,6 @@ public class ComponentInputsMergeBLTest extends BaseComponentInputsMerge {
     }
 
     @Test
-    @DisplayName("When old component has no inputs then return ok")
     public void whenOldComponentHasNoInputs_returnOk() {
         ActionStatus actionStatus = testInstance.mergeComponents(new Resource(), new Resource());
         assertThat(actionStatus).isEqualTo(ActionStatus.OK);
@@ -69,7 +67,6 @@ public class ComponentInputsMergeBLTest extends BaseComponentInputsMerge {
     }
 
     @Test
-    @DisplayName("When current resource has no properties no redeclaration of inputs required")
     public void whenCurrResourceHasNoProperties_noRedeclarationOFInputsRequired() {
         Resource newResource = new ResourceBuilder().setUniqueId(RESOURCE_ID).build();
         when(toscaOperationFacade.updateInputsToComponent(emptyList(), RESOURCE_ID)).thenReturn(Either.left(null));
@@ -80,7 +77,6 @@ public class ComponentInputsMergeBLTest extends BaseComponentInputsMerge {
     }
 
     @Test
-    @DisplayName("When current resource has no inputs no merge required, update resource with inputs declared in previous version")
     public void whenCurrResourceHasNoInputs_noMergeRequired_updateResourceWithInputsDeclaredInPrevVersion() {
         List<InputDefinition> prevDeclaredInputs = ObjectGenerator.buildInputs("declared1", "declared2");
         currResource.setInputs(null);
@@ -94,7 +90,6 @@ public class ComponentInputsMergeBLTest extends BaseComponentInputsMerge {
     }
 
     @Test
-    @DisplayName("Find inputs declared from properties and merge them into new component")
     public void findInputsDeclaredFromPropertiesAndMergeThemIntoNewComponent() {
         List<InputDefinition> prevDeclaredInputs = ObjectGenerator.buildInputs("declared1", "declared2");
         List<InputDefinition> currInputsPreMerge = new ArrayList<>(currResource.getInputs());
@@ -109,7 +104,6 @@ public class ComponentInputsMergeBLTest extends BaseComponentInputsMerge {
     }
 
     @Test
-    @DisplayName("Identify already existing inputs and don't merge them into new component")
     public void identifyAlreadyExistingInputsAndDontMergeThemIntoNewComponent() {
         List<InputDefinition> prevDeclaredInputs = ObjectGenerator.buildInputs("declared1", "declared2", "input1");
         List<InputDefinition> prevDeclaredInputsNotPresentInCurrent = ObjectGenerator.buildInputs("declared1", "declared2");
@@ -127,7 +121,6 @@ public class ComponentInputsMergeBLTest extends BaseComponentInputsMerge {
 
 
     @Test
-    @DisplayName("When failing to update inputs propagate the error")
     public void whenFailingToUpdateInputs_propagateTheError() {
         Resource newResource = new ResourceBuilder().setUniqueId(RESOURCE_ID).build();
         when(toscaOperationFacade.updateInputsToComponent(emptyList(), RESOURCE_ID)).thenReturn(Either.right(StorageOperationStatus.GENERAL_ERROR));
index 3275321..dda15ea 100644 (file)
                 <version>${junit.version}</version>
                 <scope>test</scope>
             </dependency>
-            <dependency>
-                <groupId>org.junit.jupiter</groupId>
-                <artifactId>junit-jupiter</artifactId>
-                <version>${junitJupiter.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.mockito</groupId>
-                <artifactId>mockito-junit-jupiter</artifactId>
-                <version>${mockitoJupiter.version}</version>
-                <scope>test</scope>
-            </dependency>
             <dependency>
                 <groupId>org.mockito</groupId>
                 <artifactId>mockito-all</artifactId>
diff --git a/pom.xml b/pom.xml
index fb54ec1..5fe1cb5 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -20,8 +20,8 @@ Modifications copyright (c) 2018-2019 Nokia
 ================================================================================
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <groupId>org.openecomp.sdc</groupId>
@@ -124,16 +124,16 @@ Modifications copyright (c) 2018-2019 Nokia
     <bean-matchers.version>0.11</bean-matchers.version>
     <hamcrest.version>2.1</hamcrest.version>
     <hamcrest-all.version>1.3</hamcrest-all.version>
-    <maven-surefire-plugin.version>2.22.0</maven-surefire-plugin.version>
+    <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
     <maven-jar-plugin.version>2.4</maven-jar-plugin.version>
 
     <!-- parser-->
     <sdc-tosca-parser.version>1.6.5</sdc-tosca-parser.version>
 
     <!-- sonar -->
-       <sonar.coverage.jacoco.xmlReportPaths>
-               ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
-       </sonar.coverage.jacoco.xmlReportPaths>
+    <sonar.coverage.jacoco.xmlReportPaths>
+      ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
+    </sonar.coverage.jacoco.xmlReportPaths>
     <sonar.sourceEncoding>${project.build.sourceEncoding}</sonar.sourceEncoding>
     <sonar.projectBaseDir>${project.basedir}</sonar.projectBaseDir>
     <sonar.branch>${project.version}</sonar.branch>
@@ -459,12 +459,12 @@ Modifications copyright (c) 2018-2019 Nokia
             <configuration>
               <source>
                 pom.properties['deploy.url'] =
-                  pom.version.contains('-SNAPSHOT') ?
-                    project.distributionManagement.snapshotRepository.url :
-                    project.distributionManagement.repository.url;
+                        pom.version.contains('-SNAPSHOT') ?
+                                project.distributionManagement.snapshotRepository.url :
+                                project.distributionManagement.repository.url;
                 pom.properties['repo.id'] = pom.version.contains('-SNAPSHOT') ?
-                  project.distributionManagement.snapshotRepository.id :
-                  project.distributionManagement.repository.id;
+                        project.distributionManagement.snapshotRepository.id :
+                        project.distributionManagement.repository.id;
               </source>
             </configuration>
           </execution>
@@ -617,3 +617,4 @@ Modifications copyright (c) 2018-2019 Nokia
     </site>
   </distributionManagement>
 </project>
+
index 5437f4e..6152fdf 100644 (file)
                        <version>4.12</version>
                        <scope>test</scope>
                </dependency>
-               <dependency>
-                       <groupId>org.junit.jupiter</groupId>
-                       <artifactId>junit-jupiter</artifactId>
-                       <version>${junitJupiter.version}</version>
-                       <scope>test</scope>
-               </dependency>
-               <dependency>
-                       <groupId>org.mockito</groupId>
-                       <artifactId>mockito-junit-jupiter</artifactId>
-                       <version>${mockitoJupiter.version}</version>
-                       <scope>test</scope>
-               </dependency>
                <dependency>
                        <groupId>org.mockito</groupId>
                        <artifactId>mockito-core</artifactId>
index 214671c..ed38278 100644 (file)
                        <scope>test</scope>
                </dependency>
 
-               <dependency>
-                       <groupId>org.junit.jupiter</groupId>
-                       <artifactId>junit-jupiter</artifactId>
-                       <version>${junitJupiter.version}</version>
-                       <scope>test</scope>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.mockito</groupId>
-                       <artifactId>mockito-junit-jupiter</artifactId>
-                       <version>${mockitoJupiter.version}</version>
-                       <scope>test</scope>
-               </dependency>
-
                <dependency>
                        <groupId>javax.servlet</groupId>
                        <artifactId>servlet-api</artifactId>