keycloak-aplcache

Merge pull request #4749 from wyvie/springboot-testing-fix [KEYCLOAK-3837]

11/28/2017 9:05:21 PM

Details

diff --git a/testsuite/integration-arquillian/tests/other/springboot-tests/pom.xml b/testsuite/integration-arquillian/tests/other/springboot-tests/pom.xml
index a5e710f..8f82998 100644
--- a/testsuite/integration-arquillian/tests/other/springboot-tests/pom.xml
+++ b/testsuite/integration-arquillian/tests/other/springboot-tests/pom.xml
@@ -17,6 +17,7 @@
         <adapter.container>tomcat</adapter.container>
 
         <repo.argument />
+        <maven.settings.file />
     </properties>
 
     <dependencies>
@@ -64,9 +65,12 @@
                                 <configuration>
                                     <name>springboot</name>
                                     <workingDir>../../../../test-apps/spring-boot-adapter</workingDir>
+                                    <healthcheckUrl>http://localhost:8280/index.html</healthcheckUrl>
+                                    <waitAfterLaunch>360</waitAfterLaunch>
                                     <arguments>
                                         <argument>mvn</argument>
                                         <argument>spring-boot:run</argument>
+                                        <argument>-B</argument>
                                         <argument>-Dkeycloak.version=${project.version}</argument>
                                         <argument>-Pspring-boot-adapter-${adapter.container}</argument>
                                         <argument>-Dmaven.repo.local=${settings.localRepository}</argument>
@@ -89,6 +93,56 @@
         </profile>
 
         <profile>
+            <id>test-springboot-prod</id>
+            <properties>
+                <exclude.springboot>-</exclude.springboot>
+            </properties>
+
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.bazaarvoice.maven.plugins</groupId>
+                        <artifactId>process-exec-maven-plugin</artifactId>
+                        <version>0.7</version>
+                        <executions>
+                            <execution>
+                                <id>spring-boot-application-process</id>
+                                <phase>generate-test-resources</phase>
+                                <goals>
+                                    <goal>start</goal>
+                                </goals>
+                                <configuration>
+                                    <name>springboot</name>
+                                    <workingDir>../../../../test-apps/spring-boot-adapter</workingDir>
+                                    <healthcheckUrl>http://localhost:8280/index.html</healthcheckUrl>
+                                    <waitAfterLaunch>360</waitAfterLaunch>
+                                    <arguments>
+                                        <argument>mvn</argument>
+                                        <argument>spring-boot:run</argument>
+                                        <argument>-B</argument>
+                                        <argument>-s</argument>
+                                        <argument>${maven.settings.file}</argument>
+                                        <argument>-Dkeycloak.version=${project.version}</argument>
+                                        <argument>-Pspring-boot-adapter-${adapter.container}</argument>
+                                        <argument>-Dmaven.repo.local=${settings.localRepository}</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+
+                            <execution>
+                                <id>kill-processes</id>
+                                <phase>post-integration-test</phase>
+                                <goals>
+                                    <goal>stop-all</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+        <profile>
             <id>turn-on-repo-url</id>
             <activation>
                 <property>