keycloak-uncached

KEYCLOAK-7267 change a way how to install adapters in testsuite

5/3/2018 6:05:01 AM

Details

diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/common/cli/add-adapter-log-level.cli b/testsuite/integration-arquillian/servers/app-server/jboss/common/cli/add-adapter-log-level.cli
index eab4cb2..01e7ad9 100644
--- a/testsuite/integration-arquillian/servers/app-server/jboss/common/cli/add-adapter-log-level.cli
+++ b/testsuite/integration-arquillian/servers/app-server/jboss/common/cli/add-adapter-log-level.cli
@@ -1 +1,4 @@
-/subsystem=logging/logger=org.keycloak.adapters:add(level=DEBUG)
\ No newline at end of file
+embed-server --server-config=${server.config:standalone.xml}
+
+/subsystem=logging/logger=org.keycloak.adapters:add(level=DEBUG)
+/subsystem=logging/console-handler=CONSOLE:change-log-level(level=DEBUG)
diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/eap/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/eap/pom.xml
index d090279..6d49e9d 100644
--- a/testsuite/integration-arquillian/servers/app-server/jboss/eap/pom.xml
+++ b/testsuite/integration-arquillian/servers/app-server/jboss/eap/pom.xml
@@ -39,6 +39,8 @@
         
         <app.server.oidc.adapter.artifactId>keycloak-wildfly-adapter-dist</app.server.oidc.adapter.artifactId>
         <app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
+
+        <skip.elytron.adapter.installation>false</skip.elytron.adapter.installation>
     </properties>
 
 </project>
diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/eap6/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/eap6/pom.xml
index 51047ff..9a99b1b 100644
--- a/testsuite/integration-arquillian/servers/app-server/jboss/eap6/pom.xml
+++ b/testsuite/integration-arquillian/servers/app-server/jboss/eap6/pom.xml
@@ -62,6 +62,28 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>exec-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>install-adapters-online</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>exec</goal>
+                        </goals>
+                        <configuration>
+                            <executable>${common.resources}/install-adapters-online.${script.suffix}</executable>
+                            <workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
+                            <environmentVariables>
+                                <JAVA_HOME>${app.server.java.home}</JAVA_HOME>
+                                <JBOSS_HOME>${app.server.jboss.home}</JBOSS_HOME>
+                                <SAML_SUPPORTED>${app.server.saml.adapter.supported}</SAML_SUPPORTED>
+                            </environmentVariables>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 
diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml
index 913c813..bad93df 100644
--- a/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml
+++ b/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml
@@ -37,7 +37,8 @@
         <security.xslt>security.xsl</security.xslt>
         <oidc-adapter.version>${project.version}</oidc-adapter.version>
         <saml-adapter.version>${project.version}</saml-adapter.version>
-        <app.server.elytron.adapter.supported>false</app.server.elytron.adapter.supported>
+        <skip.elytron.adapter.installation>true</skip.elytron.adapter.installation>
+        <skip.adapter.offline.installation>true</skip.adapter.offline.installation>
     </properties>
 
     <profiles>
@@ -196,21 +197,166 @@
                         <artifactId>exec-maven-plugin</artifactId>
                         <executions>
                             <execution>
-                                <id>install-adapters</id>
+                                <id>add-adapter-log-level-standalone</id>
                                 <phase>process-resources</phase>
                                 <goals>
                                     <goal>exec</goal>
                                 </goals>
                                 <configuration>
-                                    <executable>${common.resources}/install-adapters.${script.suffix}</executable>
+                                    <executable>./jboss-cli.${script.suffix}</executable>
                                     <workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
-                                    <environmentVariables>
-                                        <JAVA_HOME>${app.server.java.home}</JAVA_HOME>
-                                        <JBOSS_HOME>${app.server.jboss.home}</JBOSS_HOME>
-                                        <SAML_SUPPORTED>${app.server.saml.adapter.supported}</SAML_SUPPORTED>
-                                        <ELYTRON_SUPPORTED>${app.server.elytron.adapter.supported}</ELYTRON_SUPPORTED>
-                                        <CLI_PATH>${common.resources}/cli</CLI_PATH>
-                                    </environmentVariables>
+                                    <arguments>
+                                        <argument>--file=${common.resources}/cli/add-adapter-log-level.cli</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>add-adapter-log-level-standalone-ha</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <executable>./jboss-cli.${script.suffix}</executable>
+                                    <workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
+                                    <arguments>
+                                        <argument>--file=${common.resources}/cli/add-adapter-log-level.cli</argument>
+                                        <argument>-Dserver.config=standalone-ha.xml</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+
+                            <execution>
+                                <!--OIDC: eap, wf11-->
+                                <id>adapter-elytron-install-offline-standalone</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <skip>${skip.elytron.adapter.installation}</skip>
+                                    <executable>./jboss-cli.${script.suffix}</executable>
+                                    <workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
+                                    <arguments>
+                                        <argument>--file=${app.server.jboss.home}/bin/adapter-elytron-install-offline.cli</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <!--OIDC: eap, wf11-->
+                                <id>adapter-elytron-install-offline-standalone-ha</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <skip>${skip.elytron.adapter.installation}</skip>
+                                    <executable>./jboss-cli.${script.suffix}</executable>
+                                    <workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
+                                    <arguments>
+                                        <argument>--file=${app.server.jboss.home}/bin/adapter-elytron-install-offline.cli</argument>
+                                        <argument>-Dserver.config=standalone-ha.xml</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <!--SAML: eap, wf11-->
+                                <id>adapter-elytron-install-saml-offline-standalone</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <skip>${skip.elytron.adapter.installation}</skip>
+                                    <executable>./jboss-cli.${script.suffix}</executable>
+                                    <workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
+                                    <arguments>
+                                        <argument>--file=${app.server.jboss.home}/bin/adapter-elytron-install-saml-offline.cli</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <!--SAML: eap, wf11-->
+                                <id>adapter-elytron-install-saml-offline-standalone-ha</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <skip>${skip.elytron.adapter.installation}</skip>
+                                    <executable>./jboss-cli.${script.suffix}</executable>
+                                    <workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
+                                    <arguments>
+                                        <argument>--file=${app.server.jboss.home}/bin/adapter-elytron-install-saml-offline.cli</argument>
+                                        <argument>-Dserver.config=standalone-ha.xml</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+
+                            <execution>
+                                <!--OIDC: wf10, wf9-->
+                                <id>adapter-install-offline-standalone</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <skip>${skip.adapter.offline.installation}</skip>
+                                    <executable>./jboss-cli.${script.suffix}</executable>
+                                    <workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
+                                    <arguments>
+                                        <argument>--file=${app.server.jboss.home}/bin/adapter-install-offline.cli</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <!--OIDC: wf10, wf9-->
+                                <id>adapter-install-offline-standalone-ha</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <skip>${skip.adapter.offline.installation}</skip>
+                                    <executable>./jboss-cli.${script.suffix}</executable>
+                                    <workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
+                                    <arguments>
+                                        <argument>--file=${app.server.jboss.home}/bin/adapter-install-offline.cli</argument>
+                                        <argument>-Dserver.config=standalone-ha.xml</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <!--SAML: wf10, wf9-->
+                                <id>adapter-install-saml-offline-standalone</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <skip>${skip.adapter.offline.installation}</skip>
+                                    <executable>./jboss-cli.${script.suffix}</executable>
+                                    <workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
+                                    <arguments>
+                                        <argument>--file=${app.server.jboss.home}/bin/adapter-install-saml-offline.cli</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <!--SAML: wf10, wf9-->
+                                <id>adapter-install-saml-offline-standalone-ha</id>
+                                <phase>process-resources</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <skip>${skip.adapter.offline.installation}</skip>
+                                    <executable>./jboss-cli.${script.suffix}</executable>
+                                    <workingDirectory>${app.server.jboss.home}/bin</workingDirectory>
+                                    <arguments>
+                                        <argument>--file=${app.server.jboss.home}/bin/adapter-install-saml-offline.cli</argument>
+                                        <argument>-Dserver.config=standalone-ha.xml</argument>
+                                    </arguments>
                                 </configuration>
                             </execution>
                         </executions>
@@ -417,17 +563,6 @@
                 <module>eap6-fuse</module>
             </modules>
         </profile>
-
-        <profile>
-            <id>app-server-wildfly-elytron</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-            </activation>
-            <properties>
-                <wildfly.version>${elytron.wildfly.version}</wildfly.version>
-                <app.server.elytron.adapter.supported>true</app.server.elytron.adapter.supported>
-            </properties>
-        </profile>
     </profiles>
 
 </project>
diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/wildfly/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly/pom.xml
index 9f74af3..3bfdc96 100644
--- a/testsuite/integration-arquillian/servers/app-server/jboss/wildfly/pom.xml
+++ b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly/pom.xml
@@ -39,6 +39,8 @@
         
         <app.server.oidc.adapter.artifactId>keycloak-wildfly-adapter-dist</app.server.oidc.adapter.artifactId>
         <app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
+
+        <skip.elytron.adapter.installation>false</skip.elytron.adapter.installation>
     </properties>
 
 </project>
diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/wildfly10/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly10/pom.xml
index d419630..d8ccb42 100644
--- a/testsuite/integration-arquillian/servers/app-server/jboss/wildfly10/pom.xml
+++ b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly10/pom.xml
@@ -39,6 +39,8 @@
         
         <app.server.oidc.adapter.artifactId>keycloak-wildfly-adapter-dist</app.server.oidc.adapter.artifactId>
         <app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
+
+        <skip.adapter.offline.installation>false</skip.adapter.offline.installation>
     </properties>
 
 </project>
diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/wildfly9/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly9/pom.xml
index b3818c7..2714094 100644
--- a/testsuite/integration-arquillian/servers/app-server/jboss/wildfly9/pom.xml
+++ b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly9/pom.xml
@@ -39,6 +39,8 @@
         
         <app.server.oidc.adapter.artifactId>keycloak-wildfly-adapter-dist</app.server.oidc.adapter.artifactId>
         <app.server.saml.adapter.artifactId>keycloak-saml-wildfly-adapter-dist</app.server.saml.adapter.artifactId>
+
+        <skip.adapter.offline.installation>false</skip.adapter.offline.installation>
     </properties>
 
 </project>
diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/jboss/pom.xml
index f15fced..e0faa72 100644
--- a/testsuite/integration-arquillian/tests/other/adapters/jboss/pom.xml
+++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/pom.xml
@@ -38,45 +38,8 @@
         <app.server.type>managed</app.server.type>
         <auth.server.actual.protocol>http</auth.server.actual.protocol>
         <auth.server.actual.http.port>${auth.server.http.port}</auth.server.actual.http.port>
-        <keycloak.subsystem.xsl>keycloak-subsystem.xsl</keycloak.subsystem.xsl>
     </properties>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>xml-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>configure-keycloak-subsystem</id>
-                        <phase>process-test-resources</phase>
-                        <goals>
-                            <goal>transform</goal>
-                        </goals>
-                        <configuration>
-                            <transformationSets>
-                                <transformationSet>
-                                    <dir>${app.server.home}/standalone/configuration</dir>
-                                    <includes>
-                                        <include>standalone.xml</include>
-                                    </includes>
-                                    <stylesheet>${common.resources}/xslt/${keycloak.subsystem.xsl}</stylesheet>
-                                    <outputDir>${app.server.home}/standalone/configuration</outputDir>
-                                    <parameters>
-                                        <parameter>
-                                            <name>auth-server-host</name>
-                                            <value>${auth.server.actual.protocol}://localhost:${auth.server.actual.http.port}</value>
-                                        </parameter>
-                                    </parameters>
-                                </transformationSet>
-                            </transformationSets>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-    
     <profiles>
         <profile>
             <id>ssl</id>
@@ -93,13 +56,6 @@
             </properties>
         </profile>
         <profile>
-            <id>keycloak-subsystem-separate-realm</id>
-            <properties>
-                <!-- single realm definition, multiple secure-deployments -->
-                <keycloak.subsystem.xsl>keycloak-subsystem_separate-realm-def.xsl</keycloak.subsystem.xsl>
-            </properties>
-        </profile>
-        <profile>
             <id>adapter-test-jboss-submodules</id>
             <activation>
                 <file>