Move netconf integration tests to separate catalog 67/106067/5
authorBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Thu, 16 Apr 2020 05:46:53 +0000 (07:46 +0200)
committerBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Thu, 16 Apr 2020 11:38:38 +0000 (13:38 +0200)
Issue-ID: INT-1517
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Change-Id: I814439a6b0ab7fbe08253c7bd9639bde3320ece2

netconfsimulator/README.md
netconfsimulator/netconf/yang_loader.log [deleted file]
netconfsimulator/pom.xml
netconfsimulator/src/it/java/integration/NetconfFunctionsIT.java [moved from netconfsimulator/src/test/java/integration/NetconfFunctionsIT.java with 99% similarity]
netconfsimulator/src/it/java/integration/NetconfSimulatorClient.java [moved from netconfsimulator/src/test/java/integration/NetconfSimulatorClient.java with 100% similarity]

index 98397a9..701e3db 100644 (file)
@@ -316,8 +316,8 @@ response:
 
 ### Integration tests
 Integration tests use docker-compose for setting up cluster with all services.
-Those tests are not part of build pipeline, but can be run manually by invoking *mvn verify -DskipITs=false* from project command line.
-Tests can be found in netconfsimulator project in src/integration directory.
+Those tests are not part of build pipeline, but can be run manually by invoking *mvn clean verify -P integration* from project command line.
+Tests can be found in netconfsimulator project in src/it directory.
 
 ## Troubleshooting
 Q: Simulator throws errors after shutting down with *docker-compose down* or *docker-compose restart*
diff --git a/netconfsimulator/netconf/yang_loader.log b/netconfsimulator/netconf/yang_loader.log
deleted file mode 100644 (file)
index 61b95b3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-INFO:werkzeug: * Running on http://0.0.0.0:5002/ (Press CTRL+C to quit)
index d03c650..b000f1c 100644 (file)
     <netopeer-saver-source-dir>${project.basedir}/netopeer-change-saver-native</netopeer-saver-source-dir>
     <netopeer-saver-build-dir>${project.build.directory}/cmake</netopeer-saver-build-dir>
     <netopeer-saver-executable-dir>${netopeer-saver-build-dir}/bin</netopeer-saver-executable-dir>
-    <skipITs>true</skipITs>
     <proxy>""</proxy>
+    <skip-integration-tests>true</skip-integration-tests>
+    <skip-unit-tests>false</skip-unit-tests>
+    <project.build.integrationTestSourceDirectory>${project.basedir}/src/it/java</project.build.integrationTestSourceDirectory>
   </properties>
 
   <dependencies>
       </plugin>
       <plugin>
         <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.19</version>
-        <dependencies>
-          <dependency>
-            <groupId>org.junit.platform</groupId>
-            <artifactId>junit-platform-surefire-provider</artifactId>
-            <version>1.1.1</version>
-          </dependency>
-        </dependencies>
         <configuration>
+          <skipTests>${skip-unit-tests}</skipTests>
           <detail>true</detail>
           <printSummary>true</printSummary>
           <useSystemClassLoader>false</useSystemClassLoader>
       <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-failsafe-plugin</artifactId>
-          <version>2.19.1</version>
           <configuration>
-              <skipITs>${skipITs}</skipITs>
+              <testSourceDirectory>${project.build.integrationTestSourceDirectory}</testSourceDirectory>
+              <skipITs>${skip-integration-tests}</skipITs>
           </configuration>
-          <executions>
-              <execution>
-                  <goals>
-                      <goal>integration-test</goal>
-                      <goal>verify</goal>
-                  </goals>
-              </execution>
-          </executions>
       </plugin>
+        <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>build-helper-maven-plugin</artifactId>
+            <version>3.1.0</version>
+            <executions>
+                <execution>
+                    <id>add-integration-test-source-as-test-sources</id>
+                    <phase>generate-test-sources</phase>
+                    <goals>
+                        <goal>add-test-source</goal>
+                    </goals>
+                    <configuration>
+                        <sources>
+                            <source>${project.build.integrationTestSourceDirectory}</source>
+                        </sources>
+                    </configuration>
+                </execution>
+            </executions>
+        </plugin>
         <plugin>
             <groupId>org.jacoco</groupId>
             <artifactId>jacoco-maven-plugin</artifactId>
     </plugins>
   </build>
     <profiles>
+        <profile>
+            <id>integration</id>
+            <properties>
+                <skip-integration-tests>false</skip-integration-tests>
+                <skip-unit-tests>true</skip-unit-tests>
+            </properties>
+        </profile>
         <profile>
             <id>docker</id>
             <activation>
@@ -188,7 +188,8 @@ public class NetconfFunctionsIT {
         }
     }
 
-    @Test
+    // ToDo: fix this integration test
+    // https://jira.onap.org/browse/INT-1535
     public void shouldGetLoadedModelByName() throws IOException {
         testShouldLoadNewYangModelAndReconfigure();