Update version to 1.13.6-SNAPSHOT
[sdc.git] / integration-tests / pom.xml
index 31abb03..5b98cac 100644 (file)
@@ -32,12 +32,12 @@ limitations under the License.
     <parent>
         <groupId>org.openecomp.sdc</groupId>
         <artifactId>sdc-main</artifactId>
-        <version>1.10.2-SNAPSHOT</version>
+        <version>1.13.6-SNAPSHOT</version>
     </parent>
 
     <properties>
         <selenium.version>3.141.59</selenium.version>
-        <gecko.driver.version>0.29.0</gecko.driver.version>
+        <gecko.driver.version>0.33.0</gecko.driver.version>
         <!-- SDC Startup parameters -->
         <it.env.name>integration-test</it.env.name>
         <it.cassandra.port>9042</it.cassandra.port>
@@ -52,10 +52,12 @@ limitations under the License.
         <it.docker.version>latest</it.docker.version>
         <it.ui.firefox.version>86.0</it.ui.firefox.version>
         <it.helm-validator.disabled>true</it.helm-validator.disabled>
+        <it.test-model.disabled>true</it.test-model.disabled>
         <it.helm-validator.version>1.3.1</it.helm-validator.version>
 
         <!-- parser-->
-        <sdc-tosca-parser.version>1.6.6</sdc-tosca-parser.version>
+        <sdc-tosca-parser.version>1.9.0</sdc-tosca-parser.version>
+        <docker.showLogs>false</docker.showLogs>
     </properties>
 
     <dependencies>
@@ -94,12 +96,32 @@ limitations under the License.
             <artifactId>catalog-model</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-server</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-servlet</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.openecomp.sdc.be</groupId>
             <artifactId>catalog-dao</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-server</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-servlet</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.openecomp.sdc</groupId>
@@ -146,8 +168,12 @@ limitations under the License.
             <scope>test</scope>
             <exclusions>
                 <exclusion>
+                    <groupId>org.apache.tinkerpop</groupId>
                     <artifactId>gremlin-groovy</artifactId>
+                </exclusion>
+                <exclusion>
                     <groupId>org.apache.tinkerpop</groupId>
+                    <artifactId>gremlin-core</artifactId>
                 </exclusion>
                 <exclusion>
                     <artifactId>slf4j-log4j12</artifactId>
@@ -202,8 +228,8 @@ limitations under the License.
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
+            <groupId>org.apache.httpcomponents.client5</groupId>
+            <artifactId>httpclient5</artifactId>
             <version>${httpclient.version}</version>
             <scope>test</scope>
             <exclusions>
@@ -255,23 +281,50 @@ limitations under the License.
         </dependency>
 
         <!--FOR the Frontend -->
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>okhttp</artifactId>
+            <version>${okhttp.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.seleniumhq.selenium</groupId>
             <artifactId>selenium-java</artifactId>
             <scope>test</scope>
             <version>${selenium.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.squareup.okhttp3</groupId>
+                    <artifactId>okhttp</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.seleniumhq.selenium</groupId>
             <artifactId>selenium-server</artifactId>
             <version>${selenium.version}</version>
             <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>javax.servlet-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.squareup.okhttp3</groupId>
+                    <artifactId>okhttp</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.seleniumhq.selenium</groupId>
             <artifactId>selenium-firefox-driver</artifactId>
             <version>${selenium.version}</version>
             <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.squareup.okhttp3</groupId>
+                    <artifactId>okhttp</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
         <dependency>
@@ -290,6 +343,10 @@ limitations under the License.
                     <groupId>org.slf4j</groupId>
                     <artifactId>jcl-over-slf4j</artifactId>
                 </exclusion>
+                <exclusion>
+                    <groupId>org.bouncycastle</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
             </exclusions>
         </dependency>
         <dependency>
@@ -333,11 +390,37 @@ limitations under the License.
             <scope>test</scope>
             <exclusions>
                 <exclusion>
-                    <artifactId>log4j</artifactId>
                     <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.owasp.esapi</groupId>
+                    <artifactId>esapi</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>javax.servlet-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.onap.aaf.authz</groupId>
+                    <artifactId>aaf-cadi-aaf</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.onap.aaf.authz</groupId>
+                    <artifactId>aaf-cadi-client</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.onap.aaf.authz</groupId>
+                    <artifactId>aaf-cadi-core</artifactId>
                 </exclusion>
             </exclusions>
         </dependency>
+        <dependency>
+            <groupId>org.functionaljava</groupId>
+            <artifactId>functionaljava</artifactId>
+            <version>${functionaljava.version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>
@@ -360,6 +443,12 @@ limitations under the License.
                                     <filtering>true</filtering>
                                     <includes>
                                         <include>integration-test.json</include>
+                                    </includes>
+                                </resource>
+                                <resource>
+                                    <directory>environments</directory>
+                                    <filtering>false</filtering>
+                                    <includes>
                                         <include>plugins-configuration.yaml</include>
                                     </includes>
                                 </resource>
@@ -388,6 +477,72 @@ limitations under the License.
                             </resources>
                         </configuration>
                     </execution>
+                    <execution>
+                        <id>copy-normatives</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>
+                                integration-tests-init/chef-repo/cookbooks/sdc-integration-tests-setup/files/default
+                            </outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>${project.build.directory}</directory>
+                                    <includes>
+                                        <include>normatives.tar.gz</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>copy-sdc-be-py</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>
+                                integration-tests-init/
+                            </outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>
+                                        ${project.parent.basedir}/catalog-be/src/main/resources/
+                                    </directory>
+                                    <includes>
+                                        <include>scripts/sdcBePy/**</include>
+                                        <inculde>scripts/setup.py</inculde>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>copy-be-configuration</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>copy-resources</goal>
+                        </goals>
+                        <configuration>
+                            <overwrite>true</overwrite>
+                            <outputDirectory>
+                                integration-tests-init/
+                            </outputDirectory>
+                            <resources>
+                                <resource>
+                                    <directory>
+                                        ${project.parent.basedir}/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/
+                                    </directory>
+                                    <includes>
+                                        <include>BE-configuration.yaml.erb</include>
+                                    </includes>
+                                </resource>
+                            </resources>
+                        </configuration>
+                    </execution>
                 </executions>
             </plugin>
             <plugin>
@@ -449,6 +604,20 @@ limitations under the License.
                             <goal>run</goal>
                         </goals>
                     </execution>
+                    <execution>
+                        <id>add-test-model-to-config</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <target name="replace config" unless="${it.test-model.disabled}">
+                                <ant antfile="src/main/assembly/replace.xml">
+                                    <target name="BE-configuration"/>
+                                </ant>
+                            </target>
+                        </configuration>
+                    </execution>
                 </executions>
             </plugin>
             <plugin>
@@ -469,13 +638,60 @@ limitations under the License.
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>${mvn.assembly.version}</version>
+                <executions>
+                    <execution>
+                        <id>normatives</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <finalName>normatives</finalName>
+                            <appendAssemblyId>false</appendAssemblyId>
+                            <descriptors>
+                                <descriptor>src/main/assembly/normatives.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-clean-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>clean.test.folder</id>
+                        <phase>clean</phase>
+                        <goals>
+                            <goal>clean</goal>
+                        </goals>
+                        <configuration>
+                            <filesets>
+                                <fileset>
+                                    <directory>
+                                        integration-tests-init/chef-repo/cookbooks/sdc-integration-tests-setup/files/default
+                                    </directory>
+                                    <followSymlinks>false</followSymlinks>
+                                    <includes>
+                                        <include>normatives.tar.gz</include>
+                                    </includes>
+                                </fileset>
+                            </filesets>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
             <plugin>
                 <groupId>io.fabric8</groupId>
                 <artifactId>docker-maven-plugin</artifactId>
                 <dependencies>
                     <dependency>
-                        <groupId>org.apache.httpcomponents</groupId>
-                        <artifactId>httpclient</artifactId>
+                        <groupId>org.apache.httpcomponents.client5</groupId>
+                        <artifactId>httpclient5</artifactId>
                         <version>${httpclient.version}</version>
                     </dependency>
                 </dependencies>
@@ -676,6 +892,9 @@ limitations under the License.
                                 <hostname>sdc-BE</hostname>
                                 <volumes>
                                     <bind>
+                                        <volume>
+                                            ${project.basedir}/integration-tests-init/BE-configuration.yaml.erb:/app/jetty/chef-solo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb
+                                        </volume>
                                         <volume>${it.chef.config}:/app/jetty/chef-solo/environments</volume>
                                         <volume>${it.shared.volume}:/app/jetty/logs</volume>
                                         <volume>
@@ -824,7 +1043,6 @@ limitations under the License.
                                 </network>
                             </run>
                         </image>
-
                         <image>
                             <name>selenium/standalone-firefox:${it.ui.firefox.version}</name>
                             <alias>firefox-standalone</alias>
@@ -895,9 +1113,60 @@ limitations under the License.
                                 </network>
                             </run>
                         </image>
+                        <image>
+                            <name>${docker.namespace}/sdc-integration-tests-init</name>
+                            <alias>integration-tests-init</alias>
+                            <build>
+                                <skip>${it.test-model.disabled}</skip>
+                                <cleanup>try</cleanup>
+                                <dockerFileDir>${project.basedir}/integration-tests-init</dockerFileDir>
+                                <tags>
+                                    <tag>latest</tag>
+                                    <tag>
+                                        ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest
+                                    </tag>
+                                    <tag>
+                                        ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-${maven.build.timestamp}
+                                    </tag>
+                                </tags>
+                            </build>
+                            <run>
+                                <skip>${it.test-model.disabled}</skip>
+                                <dependsOn>
+                                    <container>sdc-backend-init</container>
+                                </dependsOn>
+                                <env>
+                                    <ENVNAME>${it.env.name}</ENVNAME>
+                                </env>
+                                <hostname>integration-tests-init</hostname>
+                                <volumes>
+                                    <bind>
+                                        <volume>
+                                            ${it.chef.config}:/home/onap/chef-solo/environments
+                                        </volume>
+                                    </bind>
+                                </volumes>
+                                <wait>
+                                    <time>660000</time>
+                                    <log>Chef Client finished</log>
+                                </wait>
+                                <network>
+                                    <mode>custom</mode>
+                                    <name>sdc-network</name>
+                                    <alias>sdc-integration-tests-init</alias>
+                                </network>
+                            </run>
+                        </image>
                     </images>
                 </configuration>
                 <executions>
+                    <execution>
+                        <id>docker-build-for-it</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
                     <execution>
                         <id>docker-start-for-it</id>
                         <phase>pre-integration-test</phase>
@@ -914,7 +1183,6 @@ limitations under the License.
                     </execution>
                 </executions>
             </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
@@ -922,19 +1190,15 @@ limitations under the License.
                     <skip>true</skip>
                 </configuration>
             </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-failsafe-plugin</artifactId>
                 <configuration>
                     <forkCount>1</forkCount>
                     <reuseForks>true</reuseForks>
-                    <systemProperties>
-                        <property>
-                            <name>testng.dtd.http</name>
-                            <value>true</value>
-                        </property>
-                    </systemProperties>
+                    <systemPropertyVariables>
+                        <testng.dtd.http>true</testng.dtd.http>
+                    </systemPropertyVariables>
                     <suiteXmlFiles>
                         <file>src/test/resources/ci/testSuites/backend/onapApiSanity.xml</file>
                         <file>src/test/resources/ci/testSuites/frontend/onapUiSanity.xml</file>
@@ -965,17 +1229,25 @@ limitations under the License.
         </plugins>
     </build>
     <profiles>
+        <profile>
+            <id>add-test-model</id>
+            <properties>
+                <it.test-model.disabled>false</it.test-model.disabled>
+            </properties>
+        </profile>
         <profile>
             <id>all-for-integration-tests-only</id>
             <properties>
                 <surefire.skip.tests>true</surefire.skip.tests>
                 <skipTest>false</skipTest>
+                <it.test-model.disabled>false</it.test-model.disabled>
             </properties>
         </profile>
         <profile>
             <id>integration-tests-with-helm-validator</id>
             <properties>
                 <it.helm-validator.disabled>false</it.helm-validator.disabled>
+                <it.test-model.disabled>false</it.test-model.disabled>
             </properties>
             <build>
                 <plugins>
@@ -985,12 +1257,9 @@ limitations under the License.
                         <configuration>
                             <forkCount>1</forkCount>
                             <reuseForks>true</reuseForks>
-                            <systemProperties>
-                                <property>
-                                    <name>testng.dtd.http</name>
-                                    <value>true</value>
-                                </property>
-                            </systemProperties>
+                            <systemPropertyVariables>
+                                <testng.dtd.http>true</testng.dtd.http>
+                            </systemPropertyVariables>
                             <suiteXmlFiles>
                                 <file>src/test/resources/ci/testSuites/backend/onapApiSanity.xml</file>
                                 <file>src/test/resources/ci/testSuites/frontend/onapUiSanity.xml</file>
@@ -1002,5 +1271,63 @@ limitations under the License.
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <id>run-integration-tests-api</id>
+            <properties>
+                <it.helm-validator.disabled>false</it.helm-validator.disabled>
+                <skipYamlJsonValidator>true</skipYamlJsonValidator>
+                <checkstyle.skip>true</checkstyle.skip>
+                <surefire.skip.tests>true</surefire.skip.tests>
+                <skipTest>false</skipTest>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <configuration>
+                            <forkCount>1</forkCount>
+                            <reuseForks>true</reuseForks>
+                            <systemPropertyVariables>
+                                <testng.dtd.http>true</testng.dtd.http>
+                            </systemPropertyVariables>
+                            <suiteXmlFiles>
+                                <file>src/test/resources/ci/testSuites/backend/onapApiSanity.xml</file>
+                                <file>src/test/resources/ci/testSuites/backend/helmValidatorTests.xml</file>
+                            </suiteXmlFiles>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>run-integration-tests-ui</id>
+            <properties>
+                <it.helm-validator.disabled>false</it.helm-validator.disabled>
+                <skipYamlJsonValidator>true</skipYamlJsonValidator>
+                <checkstyle.skip>true</checkstyle.skip>
+                <surefire.skip.tests>true</surefire.skip.tests>
+                <skipTest>false</skipTest>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <configuration>
+                            <forkCount>1</forkCount>
+                            <reuseForks>true</reuseForks>
+                            <systemPropertyVariables>
+                                <testng.dtd.http>true</testng.dtd.http>
+                            </systemPropertyVariables>
+                            <suiteXmlFiles>
+                                <file>src/test/resources/ci/testSuites/frontend/onapUiSanity.xml</file>
+                                <file>src/test/resources/ci/testSuites/frontend/helmValidatorTests.xml</file>
+                            </suiteXmlFiles>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>