Add maven profiles and testsuite for helm validator 78/121478/6
authorRemigiusz Janeczek <remigiusz.janeczek@nokia.com>
Fri, 21 May 2021 12:50:40 +0000 (14:50 +0200)
committerMichael Morris <michael.morris@est.tech>
Wed, 2 Jun 2021 18:34:00 +0000 (18:34 +0000)
Issue-ID: SDC-3185
Signed-off-by: Remigiusz Janeczek <remigiusz.janeczek@nokia.com>
Change-Id: Ic6706c64b887fb589d3638fee5de51bf15f59e23

README.md
integration-tests/pom.xml
integration-tests/src/test/resources/ci/testSuites/backend/helmValidatorTests.xml [new file with mode: 0644]
integration-tests/src/test/resources/ci/testSuites/frontend/helmValidatorTests.xml [new file with mode: 0644]

index 53f1ad3..4789fd1 100644 (file)
--- a/README.md
+++ b/README.md
@@ -162,7 +162,15 @@ There are 2 options to start them:
   The test suites are located here:
   * BE: `integration-tests/src/test/resources/ci/testSuites/backend`
   * FE: `integration-tests/src/test/resources/ci/testSuites/frontend`
-  
+
+#### Integration tests with Helm Validator
+
+Those tests use container built externally in other ONAP repository: [sdc/sdc-helm-validator](https://gerrit.onap.org/r/admin/repos/sdc/sdc-helm-validator)
+
+You can run those tests same as default integration tests by adding additional profile to maven commands:
+`integration-tests-with-helm-validator`
+* To start SDC with Helm Validator run: `mvn clean install -P start-sdc,integration-tests-with-helm-validator`
+* To execute tests that use Helm Validator use: `mvn clean install -P run-integration-tests,integration-tests-with-helm-validator`
 ## Accessing SDC UI in Dev Mode (Legacy way)
 
 In order to access the SDC UI from your dev environment you need to do the following:
index b79547e..e6e1bba 100644 (file)
@@ -51,6 +51,8 @@ limitations under the License.
         <it.shared.volume>/tmp/sdc-integration-tests</it.shared.volume>
         <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.helm-validator.version>1.2.0</it.helm-validator.version>
 
         <!-- parser-->
         <sdc-tosca-parser.version>1.6.5</sdc-tosca-parser.version>
@@ -805,6 +807,32 @@ limitations under the License.
                                 </volumes>
                             </run>
                         </image>
+                      <image>
+                        <name>onap/org.onap.sdc.sdc-helm-validator:${it.helm-validator.version}</name>
+                        <alias>helm-validator</alias>
+                        <run>
+                          <skip>${it.helm-validator.disabled}</skip>
+                          <hostname>helm-validator</hostname>
+                          <wait>
+                            <time>20000</time>
+                            <tcp>
+                              <host>helm-validator</host>
+                              <mode>direct</mode>
+                              <ports>
+                                <port>8080</port>
+                              </ports>
+                            </tcp>
+                          </wait>
+                          <ports>
+                            <port>8085:8080</port>
+                          </ports>
+                          <network>
+                            <mode>custom</mode>
+                            <name>sdc-network</name>
+                            <alias>helm-validator</alias>
+                          </network>
+                        </run>
+                      </image>
                     </images>
                 </configuration>
                 <executions>
@@ -882,5 +910,35 @@ limitations under the License.
                 <skipTest>false</skipTest>
             </properties>
         </profile>
+        <profile>
+            <id>integration-tests-with-helm-validator</id>
+            <properties>
+                <it.helm-validator.disabled>false</it.helm-validator.disabled>
+            </properties>
+            <build>
+                <plugins>
+                    <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>
+                            <suiteXmlFiles>
+                                <file>src/test/resources/ci/testSuites/backend/onapApiSanity.xml</file>
+                                <file>src/test/resources/ci/testSuites/frontend/onapUiSanity.xml</file>
+                                <file>src/test/resources/ci/testSuites/backend/helmValidatorTests.xml</file>
+                                <file>src/test/resources/ci/testSuites/frontend/helmValidatorTests.xml</file>
+                            </suiteXmlFiles>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>
diff --git a/integration-tests/src/test/resources/ci/testSuites/backend/helmValidatorTests.xml b/integration-tests/src/test/resources/ci/testSuites/backend/helmValidatorTests.xml
new file mode 100644 (file)
index 0000000..e69785d
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >
+<suite name="helmValidatorTests" configfailurepolicy="continue" parallel="methods" thread-count="1" data-provider-thread-count="1">
+  <parameter name="makeDistribution" value="false"/>
+  <parameter name="makeToscaValidation" value="true"/>
+  <test name="HelmValidatorTests">
+    <classes>
+    </classes>
+  </test>
+</suite>
diff --git a/integration-tests/src/test/resources/ci/testSuites/frontend/helmValidatorTests.xml b/integration-tests/src/test/resources/ci/testSuites/frontend/helmValidatorTests.xml
new file mode 100644 (file)
index 0000000..ac44641
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >
+<suite name="helmValidatorTests" configfailurepolicy="continue" parallel="methods" thread-count="1" data-provider-thread-count="1">
+
+  <parameter name="makeDistribution" value="false"/>
+
+  <test name="helmValidatorTests">
+    <classes>
+    </classes>
+  </test>
+</suite>