From a9c7bbd44c160bd2234c20265b6690d103f0fdc7 Mon Sep 17 00:00:00 2001 From: Tomas Kyjovsky Date: Thu, 24 Mar 2016 11:24:21 +0100 Subject: [PATCH 1/2] KEYCLOAK-2641 moved app-server configurations from adapter tests to servers/app-server module --- testsuite/integration-arquillian/pom.xml | 90 +- .../integration-arquillian/servers/README.md | 38 + .../servers/app-server/README.md | 49 + .../servers/app-server/jboss/as7/pom.xml | 73 + .../jboss/as7/src/saml-adapter-not-supported | 1 + .../servers/app-server/jboss/assembly.xml | 46 + .../jboss/common}/add-adapter-log-level.xsl | 14 +- .../jboss/common/install-adapters.bat | 35 + .../jboss/common/install-adapters.sh | 44 + .../jboss/common}/keystore/adapter.jks | Bin .../common}/keystore/keycloak.truststore | Bin .../app-server/jboss/common}/security.xsl | 19 +- .../servers/app-server/jboss/eap/pom.xml | 44 + .../jboss/eap/src/saml-adapter-supported | 1 + .../servers/app-server/jboss/eap6/pom.xml | 68 + .../jboss/eap6/src/saml-adapter-supported | 1 + .../servers/app-server/jboss/pom.xml | 370 +++++ .../app-server/jboss/relative/eap/pom.xml | 37 + .../relative/eap/src/saml-adapter-supported | 1 + .../servers/app-server/jboss/relative/pom.xml | 61 + .../app-server/jboss/relative/wildfly/pom.xml | 37 + .../wildfly/src/saml-adapter-supported | 1 + .../servers/app-server/jboss/wildfly/pom.xml | 44 + .../jboss/wildfly/src/saml-adapter-supported | 1 + .../servers/app-server/jboss/wildfly8/pom.xml | 44 + .../wildfly8/src/saml-adapter-not-supported | 1 + .../servers/app-server/jboss/wildfly9/pom.xml | 44 + .../jboss/wildfly9/src/saml-adapter-supported | 1 + .../servers/app-server/karaf/assembly.xml | 46 + .../karaf/common/install-features.bat | 38 + .../karaf/common/install-features.sh | 44 + .../servers/app-server/karaf/fuse61/pom.xml | 64 + .../src/main/resources/install-features.cli | 6 + .../src/main/resources/uninstall-pax.cli | 5 + .../src/main/resources/users.properties | 1 + .../fuse61/src/saml-adapter-not-supported | 1 + .../servers/app-server/karaf/fuse62/pom.xml | 63 + .../src/main/resources/install-features.cli | 3 + .../src/main/resources/users.properties | 1 + .../fuse62/src/saml-adapter-not-supported | 1 + .../servers/app-server/karaf/karaf3/pom.xml | 40 + .../src/main/resources/install-features.cli | 5 + .../src/main/resources/users.properties | 2 + .../karaf3/src/saml-adapter-not-supported | 1 + .../servers/app-server/karaf/pom.xml | 210 +++ .../servers/app-server/pom.xml | 42 + .../{eap7 => app-server/tomcat}/assembly.xml | 12 +- .../tomcat/common}/tomcat-users.xsl | 5 +- .../servers/app-server/tomcat/pom.xml | 302 ++++ .../servers/app-server/tomcat/tomcat7/pom.xml | 44 + .../tomcat/tomcat7/src/saml-adapter-supported | 1 + .../servers/app-server/tomcat/tomcat8/pom.xml | 44 + .../tomcat/tomcat8/src/saml-adapter-supported | 1 + .../servers/app-server/tomcat/tomcat9/pom.xml | 44 + .../tomcat/tomcat9/src/saml-adapter-supported | 1 + .../servers/auth-server/README.md | 44 + .../jboss}/assembly.xml | 10 +- .../jboss/common}/add-dialect-logger.xsl | 0 .../jboss/common}/datasource-jdbc-url.xsl | 0 .../jboss/common}/datasource.xsl | 0 .../jboss/common}/ispn-cache-owners.xsl | 0 .../jboss/common}/keystore/keycloak.jks | Bin .../common}/keystore/keycloak.truststore | Bin .../jboss/common}/security.xsl | 0 .../servers/auth-server/jboss/eap/pom.xml | 74 + .../eap/src/main/resources}/xslt/module.xsl | 0 .../servers/auth-server/jboss/pom.xml | 496 +++++++ .../servers/auth-server/jboss/wildfly/pom.xml | 38 + .../jboss}/wildfly/src/main/xslt/module.xsl | 0 .../servers/auth-server/pom.xml | 37 + .../servers/auth-server/undertow/pom.xml | 71 + .../undertow/KeycloakOnUndertow.java} | 10 +- ...eycloakOnUndertowArquillianExtension.java} | 6 +- .../KeycloakOnUndertowConfiguration.java} | 2 +- ...boss.arquillian.core.spi.LoadableExtension | 1 + .../servers/eap7/pom.xml | 393 ------ .../servers/eap7/src/main/xslt/datasource.xsl | 107 -- .../servers/eap7/src/main/xslt/security.xsl | 72 - .../servers/migration/pom.xml | 2 +- .../migration/wildfly_kc12/assembly.xml | 2 +- .../servers/migration/wildfly_kc12/pom.xml | 2 +- .../migration/wildfly_kc13/assembly.xml | 2 +- .../servers/migration/wildfly_kc13/pom.xml | 2 +- .../migration/wildfly_kc14/assembly.xml | 2 +- .../servers/migration/wildfly_kc14/pom.xml | 2 +- .../migration/wildfly_kc15/assembly.xml | 2 +- .../servers/migration/wildfly_kc15/pom.xml | 2 +- .../migration/wildfly_kc16/assembly.xml | 2 +- .../servers/migration/wildfly_kc16/pom.xml | 2 +- .../integration-arquillian/servers/pom.xml | 91 +- .../servers/wildfly-balancer/assembly.xml | 6 +- .../servers/wildfly-balancer/pom.xml | 2 - .../src/main/xslt/mod_cluster.xsl | 2 +- .../servers/wildfly/pom.xml | 488 ------- .../wildfly/src/main/keystore/keycloak.jks | Bin 2233 -> 0 bytes .../src/main/xslt/add-dialect-logger.xsl | 45 - .../src/main/xslt/datasource-jdbc-url.xsl | 36 - .../src/main/xslt/ispn-cache-owners.xsl | 40 - .../integration-arquillian/tests/base/pom.xml | 23 +- .../arquillian/AppServerTestEnricher.java | 44 +- .../arquillian/AuthServerTestEnricher.java | 91 +- .../KeycloakArquillianExtension.java | 4 - .../AdapterLibsLocationProperty.java | 2 +- .../arquillian/containers/Registry.java | 2 +- .../containers/RegistryCreator.java | 33 +- .../console/page/fragment/DataTable.java | 3 +- .../console/page/fragment/ModalDialog.java | 12 +- .../org/keycloak/testsuite/util/Timer.java | 1 - .../testsuite/AbstractKeycloakTest.java | 2 +- .../resources/META-INF/keycloak-server.json | 3 +- .../base/src/test/resources/arquillian.xml | 186 +-- .../tests/other/adapters/as7/pom.xml | 158 --- .../adapters/as7/src/main/xslt/arquillian.xsl | 56 - .../servlet/AS7DemoServletsAdapterTest.java | 14 - .../servlet/AS7SessionServletAdapterTest.java | 14 - .../tests/other/adapters/eap6/pom.xml | 245 ---- .../src/main/keystore/keycloak.truststore | Bin 1857 -> 0 bytes .../src/main/xslt/add-adapter-log-level.xsl | 50 - .../eap6/src/main/xslt/arquillian.xsl | 54 - .../eap6/src/main/xslt/arquillian_jdk.xsl | 47 - .../adapters/eap6/src/main/xslt/security.xsl | 51 - .../servlet/EAP6DemoServletsAdapterTest.java | 16 - .../servlet/EAP6SAMLServletsAdapterTest.java | 13 - .../EAP6SessionServletAdapterTest.java | 14 - .../tests/other/adapters/eap7/pom.xml | 283 ---- .../eap7/src/main/keystore/adapter.jks | Bin 2232 -> 0 bytes .../src/main/keystore/keycloak.truststore | Bin 1857 -> 0 bytes .../src/main/xslt/add-adapter-log-level.xsl | 50 - .../eap7/src/main/xslt/arquillian.xsl | 52 - .../eap7/src/main/xslt/arquillian_jdk.xsl | 47 - .../EAP7BasicAuthExampleAdapterTest.java | 14 - .../example/EAP7CorsExampleAdapterTest.java | 15 - .../example/EAP7DemoExampleAdapterTest.java | 15 - .../EAP7JSConsoleExampleAdapterTest.java | 14 - .../example/EAP7SAMLExampleAdapterTest.java | 14 - .../servlet/EAP7DemoServletsAdapterTest.java | 16 - .../servlet/EAP7SAMLServletsAdapterTest.java | 13 - .../EAP7SessionServletAdapterTest.java | 14 - .../tests/other/adapters/jboss/as7/pom.xml | 67 + .../testsuite/adapter/AS7OIDCAdapterTest.java | 14 + .../adapter/AS7OIDCSessionAdapterTest.java | 14 + .../AS7BasicAuthExampleAdapterTest.java | 13 + .../example/AS7DemoExampleAdapterTest.java | 13 + .../adapters/jboss/common/xslt/arquillian.xsl | 60 + .../tests/other/adapters/jboss/eap/pom.xml | 38 + .../testsuite/adapter/EAPOIDCAdapterTest.java | 16 + .../adapter/EAPOIDCSessionAdapterTest.java | 14 + .../testsuite/adapter/EAPSAMLAdapterTest.java | 13 + .../EAPBasicAuthExampleAdapterTest.java | 13 + .../example/EAPDemoExampleAdapterTest.java | 13 + .../example/EAPSAMLExampleAdapterTest.java | 12 + .../tests/other/adapters/jboss/eap6/pom.xml | 41 + .../adapter/EAP6OIDCAdapterTest.java | 16 + .../adapter/EAP6OIDCSessionAdapterTest.java | 14 + .../adapter/EAP6SAMLAdapterTest.java | 13 + .../EAP6BasicAuthExampleAdapterTest.java | 3 +- .../example/EAP6CorsExampleAdapterTest.java | 3 +- .../example/EAP6DemoExampleAdapterTest.java | 4 +- .../EAP6JSConsoleExampleAdapterTest.java | 3 +- .../example/EAP6SAMLExampleAdapterTest.java | 4 +- .../tests/other/adapters/jboss/pom.xml | 102 ++ .../other/adapters/jboss/relative/eap/pom.xml | 66 + .../adapter/RelativeEAPOIDCAdapterTest.java | 12 + .../RelativeEAPOIDCSessionAdapterTest.java | 12 + .../adapter/RelativeEAPSAMLAdapterTest.java | 11 + ...elativeEAPBasicAuthExampleAdapterTest.java | 10 + .../RelativeEAPCorsExampleAdapterTest.java | 10 + .../RelativeEAPDemoExampleAdapterTest.java | 10 + ...elativeEAPJSConsoleExampleAdapterTest.java | 10 + .../RelativeEAPSAMLExampleAdapterTest.java | 10 + .../other/adapters/jboss/relative/pom.xml | 72 + .../adapters/jboss/relative/wildfly/pom.xml | 66 + .../RelativeWildflyOIDCAdapterTest.java | 12 + ...RelativeWildflyOIDCSessionAdapterTest.java | 12 + .../RelativeWildflySAMLAdapterTest.java | 11 + ...iveWildflyBasicAuthExampleAdapterTest.java | 10 + ...RelativeWildflyCorsExampleAdapterTest.java | 10 + ...RelativeWildflyDemoExampleAdapterTest.java | 10 + ...iveWildflyJSConsoleExampleAdapterTest.java | 10 + ...RelativeWildflySAMLExampleAdapterTest.java | 10 + .../wildfly}/src/test/resources/web.xml | 0 .../other/adapters/jboss/wildfly/pom.xml | 38 + .../adapter/WildflyOIDCAdapterTest.java | 14 + .../WildflyOIDCSessionAdapterTest.java | 14 + .../adapter/WildflySAMLAdapterTest.java | 13 + .../WildflyBasicAuthExampleAdapterTest.java | 3 +- .../WildflyDemoExampleAdapterTest.java | 3 +- .../WildflySAMLExampleAdapterTest.java | 12 + .../other/adapters/jboss/wildfly8/pom.xml | 38 + .../adapter/Wildfly8OIDCAdapterTest.java | 14 + .../Wildfly8OIDCSessionAdapterTest.java | 14 + .../Wildfly8BasicAuthExampleAdapterTest.java | 5 +- .../Wildfly8DemoExampleAdapterTest.java | 13 + .../other/adapters/jboss/wildfly9/pom.xml | 38 + .../adapter/Wildfly9OIDCAdapterTest.java | 14 + .../Wildfly9OIDCSessionAdapterTest.java | 14 + .../adapter/Wildfly9SAMLAdapterTest.java | 13 + .../Wildfly9BasicAuthExampleAdapterTest.java | 13 + .../Wildfly9DemoExampleAdapterTest.java | 13 + .../Wildfly9SAMLExampleAdapterTest.java | 12 + .../xslt/arquillian.xsl} | 27 +- .../tests/other/adapters/karaf/fuse61/pom.xml | 41 + .../example/Fuse61ExampleAdapterTest.java} | 6 +- .../tests/other/adapters/karaf/fuse62/pom.xml | 41 + .../example/Fuse62ExampleAdapterTest.java | 12 + .../tests/other/adapters/karaf/karaf3/pom.xml | 41 + .../example/Karaf3ExampleAdapterTest.java | 12 + .../tests/other/adapters/karaf/pom.xml | 215 ++- .../karaf/CustomKarafContainer.java | 114 -- .../CustomKarafContainerConfiguration.java | 25 - ...boss.arquillian.core.spi.LoadableExtension | 18 - .../karaf/src/main/xslt/arquillian.xsl | 68 - .../tests/other/adapters/pom.xml | 305 ++-- .../{src/main => common}/xslt/arquillian.xsl | 10 +- .../tests/other/adapters/tomcat/pom.xml | 180 +-- .../TomcatBasicAuthExampleAdapterTest.java | 15 - .../example/TomcatDemoExampleAdapterTest.java | 16 - .../TomcatDemoServletsAdapterTest.java | 12 - .../TomcatSessionServletAdapterTest.java | 12 - .../other/adapters/tomcat/tomcat7/pom.xml | 46 + .../adapter/Tomcat7OIDCAdapterTest.java | 13 + .../Tomcat7OIDCSessionAdapterTest.java | 13 + .../Tomcat7BasicAuthExampleAdapterTest.java | 12 + .../Tomcat7DemoExampleAdapterTest.java | 12 + .../other/adapters/tomcat/tomcat8/pom.xml | 46 + .../adapter/Tomcat8OIDCAdapterTest.java | 13 + .../Tomcat8OIDCSessionAdapterTest.java | 13 + .../Tomcat8BasicAuthExampleAdapterTest.java | 12 + .../Tomcat8DemoExampleAdapterTest.java | 12 + .../other/adapters/tomcat/tomcat9/pom.xml | 46 + .../adapter/Tomcat9OIDCAdapterTest.java | 13 + .../Tomcat9OIDCSessionAdapterTest.java | 13 + .../Tomcat9BasicAuthExampleAdapterTest.java | 12 + .../Tomcat9DemoExampleAdapterTest.java | 12 + .../other/adapters/wildfly-relative/pom.xml | 168 --- .../src/main/xslt/arquillian.xsl | 33 - .../src/main/xslt/standalone.xsl | 70 - ...lyRelativeBasicAuthExampleAdapterTest.java | 12 - ...WildflyRelativeCorsExampleAdapterTest.java | 12 - ...WildflyRelativeDemoExampleAdapterTest.java | 12 - ...lyRelativeJSConsoleExampleAdapterTest.java | 12 - ...WildflyRelativeSAMLExampleAdapterTest.java | 12 - ...ildflyRelativeDemoServletsAdapterTest.java | 12 - ...ildflyRelativeSAMLServletsAdapterTest.java | 11 - ...dflyRelativeSessionServletAdapterTest.java | 12 - .../tests/other/adapters/wildfly/pom.xml | 227 --- .../wildfly/src/main/keystore/adapter.jks | Bin 2232 -> 0 bytes .../src/main/keystore/keycloak.truststore | Bin 1857 -> 0 bytes .../wildfly/src/main/xslt/arquillian.xsl | 52 - .../wildfly/src/main/xslt/security.xsl | 72 - .../wildfly/src/main/xslt/standalone.xsl | 68 - .../WildflyDemoServletsAdapterTest.java | 14 - .../WildflySessionServletAdapterTest.java | 14 - .../tests/other/adapters/wildfly8/pom.xml | 123 -- .../wildfly8/src/main/xslt/arquillian.xsl | 52 - .../Wildfly8DemoServletsAdapterTest.java | 14 - .../Wildfly8SessionServletAdapterTest.java | 14 - .../tests/other/console/pom.xml | 3 +- .../page/authentication/PasswordPolicy.java | 39 +- .../page/authentication/RequiredActions.java | 3 - .../page/clients/CreateClientForm.java | 114 +- ...entCredentialsGeneratePrivateKeysForm.java | 2 - .../mappers/CreateClientMappersForm.java | 3 - .../clients/settings/ClientSettingsForm.java | 147 +- .../page/federation/LdapUserProviderForm.java | 4 - .../console/page/realm/RealmSettings.java | 7 +- .../page/roles/RoleCompositeRoles.java | 4 - .../console/authentication/OTPPolicyTest.java | 2 - .../console/clients/AbstractClientTest.java | 152 +- .../console/clients/ClientClusteringTest.java | 7 +- .../clients/ClientCredentialsTest.java | 7 +- .../clients/ClientInstallationTest.java | 7 +- .../clients/ClientMappersOIDCTest.java | 7 +- .../clients/ClientMappersSAMLTest.java | 6 +- .../console/clients/ClientRolesTest.java | 7 +- .../console/clients/ClientScopeTest.java | 27 +- .../console/clients/ClientSettingsTest.java | 89 +- .../console/clients/ClientsTest.java | 8 +- .../console/events/AdminEventsTest.java | 29 +- .../federation/LdapUserFederationTest.java | 2 +- .../tests/other/console_no_users/pom.xml | 1 - .../testsuite/user/ManyUsersTest.java | 4 +- .../src/test/resources/log4j.properties | 61 - .../tests/other/pom.xml | 13 +- .../integration-arquillian/tests/pom.xml | 1226 +++++++---------- 285 files changed, 5916 insertions(+), 5684 deletions(-) create mode 100644 testsuite/integration-arquillian/servers/README.md create mode 100644 testsuite/integration-arquillian/servers/app-server/README.md create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/as7/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/as7/src/saml-adapter-not-supported create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/assembly.xml rename testsuite/integration-arquillian/{tests/other/adapters/wildfly/src/main/xslt => servers/app-server/jboss/common}/add-adapter-log-level.xsl (77%) create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/common/install-adapters.bat create mode 100755 testsuite/integration-arquillian/servers/app-server/jboss/common/install-adapters.sh rename testsuite/integration-arquillian/{tests/other/adapters/eap6/src/main => servers/app-server/jboss/common}/keystore/adapter.jks (100%) rename testsuite/integration-arquillian/servers/{eap7/src/main => app-server/jboss/common}/keystore/keycloak.truststore (100%) rename testsuite/integration-arquillian/{tests/other/adapters/eap7/src/main/xslt => servers/app-server/jboss/common}/security.xsl (79%) create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/eap/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/eap/src/saml-adapter-supported create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/eap6/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/eap6/src/saml-adapter-supported create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/relative/eap/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/relative/eap/src/saml-adapter-supported create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/relative/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/relative/wildfly/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/relative/wildfly/src/saml-adapter-supported create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/wildfly/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/wildfly/src/saml-adapter-supported create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/wildfly8/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/wildfly8/src/saml-adapter-not-supported create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/wildfly9/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/jboss/wildfly9/src/saml-adapter-supported create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/assembly.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/common/install-features.bat create mode 100755 testsuite/integration-arquillian/servers/app-server/karaf/common/install-features.sh create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse61/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/main/resources/install-features.cli create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/main/resources/uninstall-pax.cli create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/main/resources/users.properties create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/saml-adapter-not-supported create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse62/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse62/src/main/resources/install-features.cli create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse62/src/main/resources/users.properties create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/fuse62/src/saml-adapter-not-supported create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/karaf3/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/karaf3/src/main/resources/install-features.cli create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/karaf3/src/main/resources/users.properties create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/karaf3/src/saml-adapter-not-supported create mode 100644 testsuite/integration-arquillian/servers/app-server/karaf/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/pom.xml rename testsuite/integration-arquillian/servers/{eap7 => app-server/tomcat}/assembly.xml (80%) rename testsuite/integration-arquillian/{tests/other/adapters/tomcat/src/main/xslt => servers/app-server/tomcat/common}/tomcat-users.xsl (89%) create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/saml-adapter-supported create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/saml-adapter-supported create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/pom.xml create mode 100644 testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/saml-adapter-supported create mode 100644 testsuite/integration-arquillian/servers/auth-server/README.md rename testsuite/integration-arquillian/servers/{wildfly => auth-server/jboss}/assembly.xml (79%) rename testsuite/integration-arquillian/servers/{eap7/src/main/xslt => auth-server/jboss/common}/add-dialect-logger.xsl (100%) rename testsuite/integration-arquillian/servers/{eap7/src/main/xslt => auth-server/jboss/common}/datasource-jdbc-url.xsl (100%) rename testsuite/integration-arquillian/servers/{wildfly/src/main/xslt => auth-server/jboss/common}/datasource.xsl (100%) rename testsuite/integration-arquillian/servers/{eap7/src/main/xslt => auth-server/jboss/common}/ispn-cache-owners.xsl (100%) rename testsuite/integration-arquillian/servers/{eap7/src/main => auth-server/jboss/common}/keystore/keycloak.jks (100%) rename testsuite/integration-arquillian/servers/{wildfly/src/main => auth-server/jboss/common}/keystore/keycloak.truststore (100%) rename testsuite/integration-arquillian/servers/{wildfly/src/main/xslt => auth-server/jboss/common}/security.xsl (100%) create mode 100644 testsuite/integration-arquillian/servers/auth-server/jboss/eap/pom.xml rename testsuite/integration-arquillian/servers/{eap7/src/main => auth-server/jboss/eap/src/main/resources}/xslt/module.xsl (100%) create mode 100644 testsuite/integration-arquillian/servers/auth-server/jboss/pom.xml create mode 100644 testsuite/integration-arquillian/servers/auth-server/jboss/wildfly/pom.xml rename testsuite/integration-arquillian/servers/{ => auth-server/jboss}/wildfly/src/main/xslt/module.xsl (100%) create mode 100644 testsuite/integration-arquillian/servers/auth-server/pom.xml create mode 100644 testsuite/integration-arquillian/servers/auth-server/undertow/pom.xml rename testsuite/integration-arquillian/{tests/base/src/main/java/org/keycloak/testsuite/arquillian/undertow/CustomUndertowContainer.java => servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/KeycloakOnUndertow.java} (93%) rename testsuite/integration-arquillian/{tests/other/adapters/karaf/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainerExtension.java => servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/KeycloakOnUndertowArquillianExtension.java} (53%) rename testsuite/integration-arquillian/{tests/base/src/main/java/org/keycloak/testsuite/arquillian/undertow/CustomUndertowContainerConfiguration.java => servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/KeycloakOnUndertowConfiguration.java} (94%) create mode 100644 testsuite/integration-arquillian/servers/auth-server/undertow/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension delete mode 100644 testsuite/integration-arquillian/servers/eap7/pom.xml delete mode 100644 testsuite/integration-arquillian/servers/eap7/src/main/xslt/datasource.xsl delete mode 100644 testsuite/integration-arquillian/servers/eap7/src/main/xslt/security.xsl delete mode 100644 testsuite/integration-arquillian/servers/wildfly/pom.xml delete mode 100644 testsuite/integration-arquillian/servers/wildfly/src/main/keystore/keycloak.jks delete mode 100644 testsuite/integration-arquillian/servers/wildfly/src/main/xslt/add-dialect-logger.xsl delete mode 100644 testsuite/integration-arquillian/servers/wildfly/src/main/xslt/datasource-jdbc-url.xsl delete mode 100644 testsuite/integration-arquillian/servers/wildfly/src/main/xslt/ispn-cache-owners.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/as7/pom.xml delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/as7/src/main/xslt/arquillian.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/as7/src/test/java/org/keycloak/testsuite/adapter/servlet/AS7DemoServletsAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/as7/src/test/java/org/keycloak/testsuite/adapter/servlet/AS7SessionServletAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap6/pom.xml delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/keystore/keycloak.truststore delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/add-adapter-log-level.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/arquillian.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/arquillian_jdk.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/security.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP6DemoServletsAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP6SAMLServletsAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP6SessionServletAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/pom.xml delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/keystore/adapter.jks delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/keystore/keycloak.truststore delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/add-adapter-log-level.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/arquillian.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/arquillian_jdk.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7BasicAuthExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7CorsExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7DemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7JSConsoleExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7SAMLExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP7DemoServletsAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP7SAMLServletsAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP7SessionServletAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/as7/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/AS7OIDCAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/AS7OIDCSessionAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/example/AS7BasicAuthExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/example/AS7DemoExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/common/xslt/arquillian.xsl create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/EAPOIDCAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/EAPOIDCSessionAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/EAPSAMLAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPBasicAuthExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPDemoExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPSAMLExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/EAP6OIDCAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/EAP6OIDCSessionAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/EAP6SAMLAdapterTest.java rename testsuite/integration-arquillian/tests/other/adapters/{ => jboss}/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6BasicAuthExampleAdapterTest.java (68%) rename testsuite/integration-arquillian/tests/other/adapters/{ => jboss}/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6CorsExampleAdapterTest.java (72%) rename testsuite/integration-arquillian/tests/other/adapters/{ => jboss}/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6DemoExampleAdapterTest.java (63%) rename testsuite/integration-arquillian/tests/other/adapters/{ => jboss}/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6JSConsoleExampleAdapterTest.java (74%) rename testsuite/integration-arquillian/tests/other/adapters/{ => jboss}/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6SAMLExampleAdapterTest.java (63%) create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/RelativeEAPOIDCAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/RelativeEAPOIDCSessionAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/RelativeEAPSAMLAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPBasicAuthExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPCorsExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPDemoExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPJSConsoleExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPSAMLExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/RelativeWildflyOIDCAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/RelativeWildflyOIDCSessionAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/RelativeWildflySAMLAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyBasicAuthExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyCorsExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyDemoExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyJSConsoleExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflySAMLExampleAdapterTest.java rename testsuite/integration-arquillian/tests/other/adapters/{wildfly-relative => jboss/relative/wildfly}/src/test/resources/web.xml (100%) create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/WildflyOIDCAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/WildflyOIDCSessionAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/WildflySAMLAdapterTest.java rename testsuite/integration-arquillian/tests/other/adapters/{ => jboss}/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyBasicAuthExampleAdapterTest.java (68%) rename testsuite/integration-arquillian/tests/other/adapters/{ => jboss}/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyDemoExampleAdapterTest.java (67%) create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflySAMLExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/Wildfly8OIDCAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/Wildfly8OIDCSessionAdapterTest.java rename testsuite/integration-arquillian/tests/other/adapters/{ => jboss}/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8BasicAuthExampleAdapterTest.java (58%) create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8DemoExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/Wildfly9OIDCAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/Wildfly9OIDCSessionAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/Wildfly9SAMLAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9BasicAuthExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9DemoExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9SAMLExampleAdapterTest.java rename testsuite/integration-arquillian/tests/other/adapters/karaf/{src/main/xslt/arquillian-fuse.xsl => common/xslt/arquillian.xsl} (61%) create mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/pom.xml rename testsuite/integration-arquillian/tests/other/adapters/karaf/{src/test/java/org/keycloak/testsuite/adapter/example/KarafFuseExampleAdapterTest.java => fuse61/src/test/java/org/keycloak/testsuite/adapter/example/Fuse61ExampleAdapterTest.java} (54%) create mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/src/test/java/org/keycloak/testsuite/adapter/example/Fuse62ExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/src/test/java/org/keycloak/testsuite/adapter/example/Karaf3ExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainer.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainerConfiguration.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/xslt/arquillian.xsl rename testsuite/integration-arquillian/tests/other/adapters/tomcat/{src/main => common}/xslt/arquillian.xsl (86%) delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/example/TomcatBasicAuthExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/example/TomcatDemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/servlet/TomcatDemoServletsAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/servlet/TomcatSessionServletAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCSessionAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat7BasicAuthExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat7DemoExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCSessionAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8BasicAuthExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8DemoExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/pom.xml create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCSessionAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat9BasicAuthExampleAdapterTest.java create mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat9DemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/pom.xml delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/main/xslt/arquillian.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/main/xslt/standalone.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeBasicAuthExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeCorsExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeDemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeJSConsoleExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeSAMLExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyRelativeDemoServletsAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyRelativeSAMLServletsAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyRelativeSessionServletAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly/pom.xml delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/keystore/adapter.jks delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/keystore/keycloak.truststore delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/xslt/arquillian.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/xslt/security.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/xslt/standalone.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyDemoServletsAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflySessionServletAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly8/pom.xml delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/main/xslt/arquillian.xsl delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/test/java/org/keycloak/testsuite/adapter/servlet/Wildfly8DemoServletsAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/test/java/org/keycloak/testsuite/adapter/servlet/Wildfly8SessionServletAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/jpa-performance/src/test/resources/log4j.properties diff --git a/testsuite/integration-arquillian/pom.xml b/testsuite/integration-arquillian/pom.xml index e008b7400f..661ce28fcb 100644 --- a/testsuite/integration-arquillian/pom.xml +++ b/testsuite/integration-arquillian/pom.xml @@ -1,20 +1,20 @@ +~ Copyright 2016 Red Hat, Inc. and/or its affiliates +~ and other contributors as indicated by the @author tags. +~ +~ Licensed under the Apache License, Version 2.0 (the "License"); +~ you may not use this file except in compliance with the License. +~ You may obtain a copy of the License at +~ +~ http://www.apache.org/licenses/LICENSE-2.0 +~ +~ Unless required by applicable law or agreed to in writing, software +~ distributed under the License is distributed on an "AS IS" BASIS, +~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +~ See the License for the specific language governing permissions and +~ limitations under the License. +--> @@ -34,10 +34,52 @@ Keycloak Arquillian Integration TestSuite - - servers - tests - + + + ${project.build.directory}/containers + ${java.home} + ${java.home} + + + 1.1.11.Final + 2.52.0 + 2.0.0.Beta1 + 2.1.0.Alpha3 + 8.2.0.Final + 2.2.2 + + + + + + + org.jboss.arquillian.selenium + selenium-bom + ${selenium.version} + pom + import + + + org.jboss.arquillian + arquillian-bom + ${arquillian-core.version} + pom + import + + + org.jboss.arquillian.extension + arquillian-drone-bom + ${arquillian-drone.version} + pom + import + + + org.wildfly + wildfly-arquillian-container-managed + ${arquillian-wildfly-container.version} + + + @@ -52,13 +94,13 @@ xml-maven-plugin 1.0.1 - - org.apache.maven.plugins - maven-dependency-plugin - 2.10 - + + servers + tests + + diff --git a/testsuite/integration-arquillian/servers/README.md b/testsuite/integration-arquillian/servers/README.md new file mode 100644 index 0000000000..835e17105f --- /dev/null +++ b/testsuite/integration-arquillian/servers/README.md @@ -0,0 +1,38 @@ +# Keycloak Arquillian Integration TestSuite + +[Keycloak Arquillian Integration TestSuite](../README.md) + +## Test Servers + +A set of modules that build test-server artifacts preconfigured for various test scenarios. +The artifacts are used by the Arquillian TestSuite. + +### Auth Server + +- JBoss + - Wildfly 10 + - EAP 7 +- Undertow + +[Details...](auth-server/README.md) + + +### App Server + +- JBoss + - JBossAS 7 + - Wildfly 8, 9, 10 + - EAP 6, 7 + - Relative (Wildfly 10 / EAP 7) +- Karaf / Fuse + - Karaf 3 + - Fuse 6.1, 6.2 +- Tomcat + - Tomcat 7, 8 + +[Details...](app-server/README.md) + +### Load Balancer + +- Wildfly + mod_cluster + diff --git a/testsuite/integration-arquillian/servers/app-server/README.md b/testsuite/integration-arquillian/servers/app-server/README.md new file mode 100644 index 0000000000..6905f037cd --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/README.md @@ -0,0 +1,49 @@ +# Keycloak Arquillian Integration TestSuite - Test Servers + +[Up...](../README.md) + +## App Server - JBoss + +JBoss-based container with installed and configured Keycloak adapter. + +Submodules are enabled with profiles: `-Papp-server-MODULE` + +### Modules + +* __`as7` JBossAS 7__ +* __`wildfly8` Wildfly 8__ +* __`wildfly9` Wildfly 9__ +* __`wildfly` Wildfly 10__ +* __`eap6` EAP 6__ Requires access to EAP product repo, or setting `-Deap6.version` to public EAP 6 Alpha. +* __`eap` EAP 7__ Requires access to EAP product repo. +* __`relative`__ Activate with `-Papp-server-relative`. + * __`wildfly` Relative Wildfly 10__ Based on [`auth-server/jboss/wildfly`](../auth-server/README.md). Activate with `-Pauth-server-wildfly`. + * __`eap` Relative EAP 7__ Based on [`auth-server/jboss/eap`](../auth-server/README.md). Activate with `-Pauth-server-eap`. + +### Adapter Libs Location + +* __Provided__ (in container) - Default. +* __Bundled__ (in war) `-Dadapter.libs.bundled=true` + +### Adapter Configs Location + +* __Provided__ (in standalone.xml as secure-deployment) _Not implemented_ +* __Bundled__ (in war) - Default. + +### SSL + +Configures SSL in `standalone.xml`. See profile `ssl`. + + +## App Server - Karaf +Submodules are enabled with profiles: `-Papp-server-MODULE` +### Modules +* __`karaf3` Karaf 3__ +* __`fuse61` JBoss Fuse 6.1__ +* __`fuse62` JBoss Fuse 6.2__ + +## App Server - Tomcat +Submodules are enabled with profiles: `-Papp-server-MODULE` +### Modules +* __`tomcat7` Tomcat 7__ +* __`tomcat8` Tomcat 8__ diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/as7/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/as7/pom.xml new file mode 100644 index 0000000000..71bf55ad3d --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/as7/pom.xml @@ -0,0 +1,73 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-jboss + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-as7 + pom + App Server - JBoss - JBossAS 7 + + + + + + + + as7 + + org.jboss.as + jboss-as-dist + ${jboss.as.version} + jboss-as-${jboss.as.version} + + keycloak-as7-adapter-dist + keycloak-saml-as7-adapter-dist + + ${java7.home} + + + + + + maven-enforcer-plugin + + + + enforce + + + + + java7.home + + + + + + + + + + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/as7/src/saml-adapter-not-supported b/testsuite/integration-arquillian/servers/app-server/jboss/as7/src/saml-adapter-not-supported new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/as7/src/saml-adapter-not-supported @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/assembly.xml b/testsuite/integration-arquillian/servers/app-server/jboss/assembly.xml new file mode 100644 index 0000000000..1cd1044dc9 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/assembly.xml @@ -0,0 +1,46 @@ + + + + + ${app.server.jboss} + + + zip + + + false + + + + ${app.server.jboss.home} + app-server-${app.server.jboss} + + **/*.sh + + + + ${app.server.jboss.home} + app-server-${app.server.jboss} + + **/*.sh + + 0755 + + + + diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/xslt/add-adapter-log-level.xsl b/testsuite/integration-arquillian/servers/app-server/jboss/common/add-adapter-log-level.xsl similarity index 77% rename from testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/xslt/add-adapter-log-level.xsl rename to testsuite/integration-arquillian/servers/app-server/jboss/common/add-adapter-log-level.xsl index 39cec8b0a6..0cc0834278 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/xslt/add-adapter-log-level.xsl +++ b/testsuite/integration-arquillian/servers/app-server/jboss/common/add-adapter-log-level.xsl @@ -17,22 +17,16 @@ - - + exclude-result-prefixes="xalan"> - + - + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/common/install-adapters.bat b/testsuite/integration-arquillian/servers/app-server/jboss/common/install-adapters.bat new file mode 100644 index 0000000000..b78f8738e4 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/common/install-adapters.bat @@ -0,0 +1,35 @@ +set NOPAUSE=true + +start "JBoss Server" /b cmd /c %JBOSS_HOME%\bin\standalone.bat + +set ERROR=0 +set TIMEOUT=10 +set I=0 + +ping 127.0.0.1 -n 3 > nul + + +:wait_for_jboss +call %JBOSS_HOME%\bin\jboss-cli.bat -c --command=":read-attribute(name=server-state)" | findstr "running" +if %ERRORLEVEL% equ 0 goto install_adapters +ping 127.0.0.1 -n 1 > nul +set /a I=%I%+1 +if %I% gtr %TIMEOUT% ( + set ERROR=1 + goto shutdown_jboss +) +goto wait_for_jboss + + +:install_adapters +call %JBOSS_HOME%\bin\jboss-cli.bat -c --file="%JBOSS_HOME%\bin\adapter-install.cli" +if %ERRORLEVEL% neq 0 set ERROR=%ERRORLEVEL% +if "%SAML_SUPPORTED%" == "true" ( + call %JBOSS_HOME%\bin\jboss-cli.bat -c --file="%JBOSS_HOME%\bin\adapter-install-saml.cli" + if %ERRORLEVEL% neq 0 set ERROR=%ERRORLEVEL% +) + + +:shutdown_jboss +call %JBOSS_HOME%\bin\jboss-cli.bat -c --command=":shutdown" +exit /b %ERROR% diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/common/install-adapters.sh b/testsuite/integration-arquillian/servers/app-server/jboss/common/install-adapters.sh new file mode 100755 index 0000000000..460599234b --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/common/install-adapters.sh @@ -0,0 +1,44 @@ +#!/bin/bash +echo "JBOSS_HOME=$JBOSS_HOME" + +if [ ! -d "$JBOSS_HOME/bin" ] ; then + >&2 echo "JBOSS_HOME/bin doesn't exist" + exit 1 +fi + +cd $JBOSS_HOME/bin + +./standalone.sh & +sleep 3 + +TIMEOUT=10 +DELAY=1 +T=0 + +RESULT=0 + +until [ $T -gt $TIMEOUT ] +do + if ./jboss-cli.sh -c --command=":read-attribute(name=server-state)" | grep -q "running" ; then + echo "Server is running. Installing adapter." + + ./jboss-cli.sh -c --file="adapter-install.cli" + if [ $? -ne 0 ]; then RESULT=1; fi + + if [ "$SAML_SUPPORTED" = true ]; then + ./jboss-cli.sh -c --file="adapter-install-saml.cli" + if [ $? -ne 0 ]; then RESULT=1; fi + fi + + ./jboss-cli.sh -c --command=":shutdown" + rm -rf $JBOSS_HOME/standalone/data + rm -rf $JBOSS_HOME/standalone/log + + exit $RESULT + fi + echo "Server is not running." + sleep $DELAY + let T=$T+$DELAY +done + +exit 1 diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/keystore/adapter.jks b/testsuite/integration-arquillian/servers/app-server/jboss/common/keystore/adapter.jks similarity index 100% rename from testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/keystore/adapter.jks rename to testsuite/integration-arquillian/servers/app-server/jboss/common/keystore/adapter.jks diff --git a/testsuite/integration-arquillian/servers/eap7/src/main/keystore/keycloak.truststore b/testsuite/integration-arquillian/servers/app-server/jboss/common/keystore/keycloak.truststore similarity index 100% rename from testsuite/integration-arquillian/servers/eap7/src/main/keystore/keycloak.truststore rename to testsuite/integration-arquillian/servers/app-server/jboss/common/keystore/keycloak.truststore diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/security.xsl b/testsuite/integration-arquillian/servers/app-server/jboss/common/security.xsl similarity index 79% rename from testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/security.xsl rename to testsuite/integration-arquillian/servers/app-server/jboss/common/security.xsl index 11db4320e0..45e0c4113d 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/security.xsl +++ b/testsuite/integration-arquillian/servers/app-server/jboss/common/security.xsl @@ -16,20 +16,13 @@ --> - - + exclude-result-prefixes="xalan"> - + @@ -41,20 +34,20 @@ - + - + - + - + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/eap/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/eap/pom.xml new file mode 100644 index 0000000000..c3c02dd36b --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/eap/pom.xml @@ -0,0 +1,44 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-jboss + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-eap + pom + App Server - JBoss - EAP + + + eap + + org.jboss.eap + wildfly-dist + ${eap.version} + jboss-eap-7.0 + + keycloak-wildfly-adapter-dist + keycloak-saml-wildfly-adapter-dist + + + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/eap/src/saml-adapter-supported b/testsuite/integration-arquillian/servers/app-server/jboss/eap/src/saml-adapter-supported new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/eap/src/saml-adapter-supported @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/eap6/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/eap6/pom.xml new file mode 100644 index 0000000000..3c3e52a62d --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/eap6/pom.xml @@ -0,0 +1,68 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-jboss + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-eap6 + pom + App Server - JBoss - EAP 6 + + + eap6 + + org.jboss.as + jboss-as-dist + ${eap6.version} + jboss-eap-6.4 + + keycloak-eap6-adapter-dist + keycloak-saml-eap6-adapter-dist + + + + + + + maven-enforcer-plugin + + + enforce-auth-server-jboss-profile + + enforce + + + + + eap6.version + + + + + + + + + + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/eap6/src/saml-adapter-supported b/testsuite/integration-arquillian/servers/app-server/jboss/eap6/src/saml-adapter-supported new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/eap6/src/saml-adapter-supported @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml new file mode 100644 index 0000000000..30db67f386 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/pom.xml @@ -0,0 +1,370 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-jboss + pom + App Server - JBoss + + + ${project.parent.basedir}/common + ${project.parent.basedir}/assembly.xml + ${containers.home}/${app.server.jboss.unpacked.folder.name} + + + + + + app-server-jboss-submodules + + + src + + + + + + + maven-enforcer-plugin + + + + enforce + + + + + app.server.jboss + app.server.jboss.groupId + app.server.jboss.artifactId + app.server.jboss.version + app.server.jboss.unpacked.folder.name + app.server.oidc.adapter.artifactId + + + + + + + + + maven-dependency-plugin + + + unpack-wildfly-and-oidc-adapter + generate-resources + + unpack + + + + + ${app.server.jboss.groupId} + ${app.server.jboss.artifactId} + ${app.server.jboss.version} + zip + ${containers.home} + + + org.keycloak + ${app.server.oidc.adapter.artifactId} + ${project.version} + zip + ${app.server.jboss.home} + + + + + + + + + org.codehaus.mojo + xml-maven-plugin + + + configure-adapter-debug-log + process-resources + + transform + + + + + ${app.server.jboss.home}/standalone/configuration + + standalone.xml + + ${common.resources}/add-adapter-log-level.xsl + ${app.server.jboss.home}/standalone/configuration + + + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + + maven-assembly-plugin + + + create-zip + package + + single + + + + ${assembly.xml} + + false + + + + + + + + + + + app-server-saml-supported + + + src/saml-adapter-supported + + + + true + + + + + maven-enforcer-plugin + + + + enforce + + + + + app.server.saml.adapter.artifactId + + + + + + + + maven-dependency-plugin + + + unpack-saml-adapter + generate-resources + + unpack + + + + + org.keycloak + ${app.server.saml.adapter.artifactId} + ${project.version} + zip + ${app.server.jboss.home} + + + + + + + + + + + + adapter-libs-provided + + + !adapter.libs.bundled + + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + install-adapters + process-test-resources + + exec + + + + + ${common.resources}/install-adapters.${script.suffix} + ${app.server.jboss.home}/bin + + ${app.server.java.home} + ${app.server.jboss.home} + ${app.server.saml.adapter.supported} + + + + + + + + + + + ssl + + + app.server.ssl.required + + + + + + maven-resources-plugin + + + + + + org.codehaus.mojo + xml-maven-plugin + + + configure-adapter-subsystem-security + process-resources + + transform + + + + + ${app.server.jboss.home}/standalone/configuration + + standalone.xml + + ${common.resources}/security.xsl + ${app.server.jboss.home}/standalone/configuration + + + + + + + + maven-resources-plugin + + + copy-keystore + process-resources + + copy-resources + + + ${app.server.jboss.home}/standalone/configuration + + + ${common.resources}/keystore + + adapter.jks + keycloak.truststore + + + + + jks + truststore + + + + + + + + + + + + app-server-as7 + + as7 + + + + app-server-eap + + eap + + + + app-server-eap6 + + eap6 + + + + app-server-wildfly + + wildfly + + + + app-server-wildfly8 + + wildfly8 + + + + app-server-wildfly9 + + wildfly9 + + + + app-server-relative + + relative + + + + + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/relative/eap/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/relative/eap/pom.xml new file mode 100644 index 0000000000..fc382ae5d6 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/relative/eap/pom.xml @@ -0,0 +1,37 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-jboss-relative + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-relative-eap + pom + App Server - JBoss - Relative EAP + + + eap + integration-arquillian-servers-auth-server-eap + + + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/relative/eap/src/saml-adapter-supported b/testsuite/integration-arquillian/servers/app-server/jboss/relative/eap/src/saml-adapter-supported new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/relative/eap/src/saml-adapter-supported @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/relative/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/relative/pom.xml new file mode 100644 index 0000000000..f6a54b79fd --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/relative/pom.xml @@ -0,0 +1,61 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-jboss + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-jboss-relative + pom + App Server - JBoss - Relative + + + ${project.parent.parent.basedir}/common + ${project.parent.parent.basedir}/assembly.xml + + relative-${auth.server.jboss} + + org.keycloak.testsuite + ${project.version} + auth-server-${auth.server.jboss} + + keycloak-wildfly-adapter-dist + keycloak-saml-wildfly-adapter-dist + + + + + auth-server-wildfly + + wildfly + + + + auth-server-eap + + eap + + + + + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/relative/wildfly/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/relative/wildfly/pom.xml new file mode 100644 index 0000000000..0bc97fea72 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/relative/wildfly/pom.xml @@ -0,0 +1,37 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-jboss-relative + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-relative-wildfly + pom + App Server - JBoss - Relative Wildfly + + + wildfly + integration-arquillian-servers-auth-server-wildfly + + + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/relative/wildfly/src/saml-adapter-supported b/testsuite/integration-arquillian/servers/app-server/jboss/relative/wildfly/src/saml-adapter-supported new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/relative/wildfly/src/saml-adapter-supported @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/wildfly/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly/pom.xml new file mode 100644 index 0000000000..0462a72e0c --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly/pom.xml @@ -0,0 +1,44 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-jboss + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-wildfly + pom + App Server - JBoss - Wildfly + + + wildfly + + org.wildfly + wildfly-dist + ${wildfly.version} + wildfly-${wildfly.version} + + keycloak-wildfly-adapter-dist + keycloak-saml-wildfly-adapter-dist + + + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/wildfly/src/saml-adapter-supported b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly/src/saml-adapter-supported new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly/src/saml-adapter-supported @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/wildfly8/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly8/pom.xml new file mode 100644 index 0000000000..de19c9a346 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly8/pom.xml @@ -0,0 +1,44 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-jboss + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-wildfly8 + pom + App Server - JBoss - Wildfly 8 + + + wildfly8 + + org.wildfly + wildfly-dist + ${wildfly8.version} + wildfly-${wildfly8.version} + + keycloak-wf8-adapter-dist + keycloak-saml-wildfly-adapter-dist + + + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/wildfly8/src/saml-adapter-not-supported b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly8/src/saml-adapter-not-supported new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly8/src/saml-adapter-not-supported @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/wildfly9/pom.xml b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly9/pom.xml new file mode 100644 index 0000000000..dd9e73f564 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly9/pom.xml @@ -0,0 +1,44 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-jboss + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-wildfly9 + pom + App Server - JBoss - Wildfly 9 + + + wildfly9 + + org.wildfly + wildfly-dist + ${wildfly9.version} + wildfly-${wildfly9.version} + + keycloak-wildfly-adapter-dist + keycloak-saml-wildfly-adapter-dist + + + diff --git a/testsuite/integration-arquillian/servers/app-server/jboss/wildfly9/src/saml-adapter-supported b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly9/src/saml-adapter-supported new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/jboss/wildfly9/src/saml-adapter-supported @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/assembly.xml b/testsuite/integration-arquillian/servers/app-server/karaf/assembly.xml new file mode 100644 index 0000000000..191cf982f6 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/assembly.xml @@ -0,0 +1,46 @@ + + + + + ${app.server.karaf} + + + zip + + + false + + + + ${app.server.karaf.home} + app-server-${app.server.karaf} + + **/*.sh + + + + ${app.server.karaf.home} + app-server-${app.server.karaf} + + **/*.sh + + 0755 + + + + diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/common/install-features.bat b/testsuite/integration-arquillian/servers/app-server/karaf/common/install-features.bat new file mode 100644 index 0000000000..7abbf5addd --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/common/install-features.bat @@ -0,0 +1,38 @@ +set NOPAUSE=true +echo "JAVA_HOME=%JAVA_HOME%" + +start "Karaf" /b cmd /c start.bat +echo "Karaf container starting" +ping 127.0.0.1 -n 5 > nul + +set ERROR=0 +set TIMEOUT=10 +set I=0 + +:wait_for_karaf +call client.bat %CLIENT_AUTH% info +if %ERRORLEVEL% equ 0 goto install_features +echo "Server is not reachable. Waiting." +ping 127.0.0.1 -n 2 > nul +set /a I=%I%+1 +if %I% gtr %TIMEOUT% ( + set ERROR=1 + goto shutdown_karaf +) +goto wait_for_karaf + + +:install_features +echo "Server is reachable. Installing features." +if "%UNINSTALL_PAX%" == "true" ( + call client.bat %CLIENT_AUTH% -f uninstall-pax.cli + if %ERRORLEVEL% neq 0 set ERROR=%ERRORLEVEL% +) +call client.bat %CLIENT_AUTH% -f install-features.cli +if %ERRORLEVEL% neq 0 set ERROR=%ERRORLEVEL% + + +:shutdown_karaf +call stop.bat +ping 127.0.0.1 -n 5 > nul +exit /b %ERROR% diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/common/install-features.sh b/testsuite/integration-arquillian/servers/app-server/karaf/common/install-features.sh new file mode 100755 index 0000000000..4173908c30 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/common/install-features.sh @@ -0,0 +1,44 @@ +#!/bin/bash +echo "JAVA_HOME=$JAVA_HOME" + +./start +echo "Karaf container starting" +sleep 5 + +TIMEOUT=10 +DELAY=1 +T=0 + +RESULT=0 + +until [ $T -gt $TIMEOUT ] +do + if ./client $CLIENT_AUTH info; then + echo "Server is reachable." + + if "$UNINSTALL_PAX" == "true"; then + echo "Uninstalling PAX" + ./client $CLIENT_AUTH -f uninstall-pax.cli + if [ $? -ne 0 ]; then RESULT=1; fi + fi + + echo "Installing features." + ./client $CLIENT_AUTH -f install-features.cli + if [ $? -ne 0 ]; then RESULT=1; fi + + ./stop + rm -rf ../data/log + rm -rf ../data/tmp + + sleep 5 + + exit $RESULT + else + echo "Server is not reachable. Waiting." + sleep $DELAY + let T=$T+$DELAY + fi +done + +./stop +exit 1 diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/pom.xml b/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/pom.xml new file mode 100644 index 0000000000..93d666b88a --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/pom.xml @@ -0,0 +1,64 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-karaf + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-fuse61 + pom + App Server - Karaf - JBoss Fuse 6.1 + + + fuse61 + org.jboss.fuse + jboss-fuse-full + ${fuse61.version} + jboss-fuse-${fuse61.version} + -u admin -p admin + true + + + + + + maven-enforcer-plugin + + + + enforce + + + + + fuse61.version + + + + + + + + + + diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/main/resources/install-features.cli b/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/main/resources/install-features.cli new file mode 100644 index 0000000000..9ac9d776cd --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/main/resources/install-features.cli @@ -0,0 +1,6 @@ +features:addurl mvn:org.ops4j.pax.web/pax-web-features/3.1.2/xml/features +features:addurl mvn:org.keycloak/keycloak-osgi-features/${project.version}/xml/features +features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features/${project.version}/xml/features +features:install keycloak-pax-web-upgrade +features:install pax-http-whiteboard/3.1.2 +features:install pax-war/3.1.2 \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/main/resources/uninstall-pax.cli b/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/main/resources/uninstall-pax.cli new file mode 100644 index 0000000000..a1106a71dd --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/main/resources/uninstall-pax.cli @@ -0,0 +1,5 @@ +features:uninstall pax-war +features:uninstall pax-http-whiteboard +features:uninstall pax-http +features:uninstall pax-jetty +features:removeurl mvn:org.ops4j.pax.web/pax-web-features/3.0.6/xml/features \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/main/resources/users.properties b/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/main/resources/users.properties new file mode 100644 index 0000000000..e6ba672637 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/main/resources/users.properties @@ -0,0 +1 @@ +admin=admin,admin \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/saml-adapter-not-supported b/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/saml-adapter-not-supported new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/fuse61/src/saml-adapter-not-supported @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse62/pom.xml b/testsuite/integration-arquillian/servers/app-server/karaf/fuse62/pom.xml new file mode 100644 index 0000000000..6f607ced50 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/fuse62/pom.xml @@ -0,0 +1,63 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-karaf + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-fuse62 + pom + App Server - Karaf - JBoss Fuse 6.2 + + + fuse62 + org.jboss.fuse + jboss-fuse-full + ${fuse62.version} + jboss-fuse-${fuse62.version} + -u admin -p admin + + + + + + maven-enforcer-plugin + + + + enforce + + + + + fuse62.version + + + + + + + + + + diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse62/src/main/resources/install-features.cli b/testsuite/integration-arquillian/servers/app-server/karaf/fuse62/src/main/resources/install-features.cli new file mode 100644 index 0000000000..9ac71e31b8 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/fuse62/src/main/resources/install-features.cli @@ -0,0 +1,3 @@ +features:addurl mvn:org.keycloak/keycloak-osgi-features/${project.version}/xml/features +features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features/${project.version}/xml/features +features:install keycloak-fuse-example \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse62/src/main/resources/users.properties b/testsuite/integration-arquillian/servers/app-server/karaf/fuse62/src/main/resources/users.properties new file mode 100644 index 0000000000..6c51920d23 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/fuse62/src/main/resources/users.properties @@ -0,0 +1 @@ +admin=admin,admin,manager,viewer,Monitor, Operator, Maintainer, Deployer, Auditor, Administrator, SuperUser \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/fuse62/src/saml-adapter-not-supported b/testsuite/integration-arquillian/servers/app-server/karaf/fuse62/src/saml-adapter-not-supported new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/fuse62/src/saml-adapter-not-supported @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/karaf3/pom.xml b/testsuite/integration-arquillian/servers/app-server/karaf/karaf3/pom.xml new file mode 100644 index 0000000000..9b9a0541ac --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/karaf3/pom.xml @@ -0,0 +1,40 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-karaf + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-karaf3 + pom + App Server - Karaf - Karaf 3 + + + karaf3 + org.apache.karaf + apache-karaf-minimal + ${karaf3.version} + apache-karaf-minimal-${karaf3.version} + + + diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/karaf3/src/main/resources/install-features.cli b/testsuite/integration-arquillian/servers/app-server/karaf/karaf3/src/main/resources/install-features.cli new file mode 100644 index 0000000000..1e011ea7d4 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/karaf3/src/main/resources/install-features.cli @@ -0,0 +1,5 @@ +feature:repo-add mvn:org.apache.camel.karaf/apache-camel/2.15.1/xml/features +feature:repo-add mvn:org.apache.cxf.karaf/apache-cxf/3.0.4/xml/features +feature:repo-add mvn:org.keycloak/keycloak-osgi-features/${project.version}/xml/features +feature:repo-add mvn:org.keycloak.example.demo/keycloak-fuse-example-features/${project.version}/xml/features +feature:install keycloak-fuse-example \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/karaf3/src/main/resources/users.properties b/testsuite/integration-arquillian/servers/app-server/karaf/karaf3/src/main/resources/users.properties new file mode 100644 index 0000000000..61ad339274 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/karaf3/src/main/resources/users.properties @@ -0,0 +1,2 @@ +karaf = karaf,_g_:admingroup +_g_\:admingroup = group,admin,manager,viewer,webconsole diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/karaf3/src/saml-adapter-not-supported b/testsuite/integration-arquillian/servers/app-server/karaf/karaf3/src/saml-adapter-not-supported new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/karaf3/src/saml-adapter-not-supported @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/karaf/pom.xml b/testsuite/integration-arquillian/servers/app-server/karaf/pom.xml new file mode 100644 index 0000000000..5c317e4523 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/karaf/pom.xml @@ -0,0 +1,210 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-karaf + pom + App Server - Karaf + + + ${project.parent.basedir}/common + ${project.parent.basedir}/assembly.xml + ${containers.home}/${app.server.karaf.unpacked.folder.name} + -u karaf + false + + + + + + app-server-karaf-submodules + + + src + + + + + + + maven-enforcer-plugin + + + + enforce + + + + + app.server.karaf + app.server.karaf.groupId + app.server.karaf.artifactId + app.server.karaf.version + app.server.karaf.unpacked.folder.name + + + !windows + Automated Kara/Fuse adapter configuration currently doesn't work on Windows. + + + + + + + + + maven-dependency-plugin + + + unpack-karaf + generate-resources + + unpack + + + + + ${app.server.karaf.groupId} + ${app.server.karaf.artifactId} + ${app.server.karaf.version} + zip + ${containers.home} + + + true + + + + + + maven-resources-plugin + + + copy-features-clie + process-resources + + copy-resources + + + ${app.server.karaf.home}/bin + + + src/main/resources + + install-features.cli + + true + + + + + + copy-users-properties + process-resources + + copy-resources + + + ${app.server.karaf.home}/etc + true + + + src/main/resources + + users.properties + + + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + install-features + process-test-resources + + exec + + + + + ${common.resources}/install-features.${script.suffix} + ${app.server.karaf.home}/bin + + ${app.server.java.home} + ${app.server.karaf.client.auth} + ${app.server.karaf.uninstall.pax} + + + + + maven-assembly-plugin + + + create-zip + package + + single + + + + ${assembly.xml} + + false + + + + + + + + + + app-server-karaf3 + + karaf3 + + + + app-server-fuse61 + + fuse61 + + + + app-server-fuse62 + + fuse62 + + + + + + diff --git a/testsuite/integration-arquillian/servers/app-server/pom.xml b/testsuite/integration-arquillian/servers/app-server/pom.xml new file mode 100644 index 0000000000..9e763fb98a --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/pom.xml @@ -0,0 +1,42 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server + pom + App Server + + + false + + + + jboss + karaf + tomcat + + + diff --git a/testsuite/integration-arquillian/servers/eap7/assembly.xml b/testsuite/integration-arquillian/servers/app-server/tomcat/assembly.xml similarity index 80% rename from testsuite/integration-arquillian/servers/eap7/assembly.xml rename to testsuite/integration-arquillian/servers/app-server/tomcat/assembly.xml index 6bce2ca9fb..396cda30b0 100644 --- a/testsuite/integration-arquillian/servers/eap7/assembly.xml +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/assembly.xml @@ -17,8 +17,8 @@ - auth-server-eap7 - + ${app.server.tomcat} + zip @@ -27,15 +27,15 @@ - ${keycloak.server.home} - keycloak-${version.server.dist} + ${app.server.tomcat.home} + app-server-${app.server.tomcat} **/*.sh - ${keycloak.server.home} - keycloak-${version.server.dist} + ${app.server.tomcat.home} + app-server-${app.server.tomcat} **/*.sh diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/main/xslt/tomcat-users.xsl b/testsuite/integration-arquillian/servers/app-server/tomcat/common/tomcat-users.xsl similarity index 89% rename from testsuite/integration-arquillian/tests/other/adapters/tomcat/src/main/xslt/tomcat-users.xsl rename to testsuite/integration-arquillian/servers/app-server/tomcat/common/tomcat-users.xsl index 35498f5bc0..5032b31e3e 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/main/xslt/tomcat-users.xsl +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/common/tomcat-users.xsl @@ -17,14 +17,13 @@ + exclude-result-prefixes="xalan"> - + diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/pom.xml b/testsuite/integration-arquillian/servers/app-server/tomcat/pom.xml new file mode 100644 index 0000000000..13ef0a8905 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/pom.xml @@ -0,0 +1,302 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-tomcat + pom + App Server - Tomcat + + + ${project.parent.basedir}/common + ${project.parent.basedir}/assembly.xml + ${containers.home}/${app.server.tomcat.unpacked.folder.name} + + + + + app-server-tomcat-submodules + + + src + + + + + + + maven-enforcer-plugin + + + + enforce + + + + + app.server.tomcat + app.server.tomcat.groupId + app.server.tomcat.artifactId + app.server.tomcat.version + app.server.tomcat.unpacked.folder.name + app.server.oidc.adapter.artifactId + + + + + + + + + maven-dependency-plugin + + + unpack-tomcat-and-adapter + generate-test-resources + + unpack + + + + + ${app.server.tomcat.groupId} + ${app.server.tomcat.artifactId} + ${app.server.tomcat.version} + zip + ${containers.home} + + + org.keycloak + ${app.server.oidc.adapter.artifactId} + ${project.version} + zip + ${app.server.tomcat.home}/lib + + + true + + + + libs-for-tomcat + generate-test-resources + + copy + + + + + org.jboss.resteasy + resteasy-client + + + org.jboss.spec.javax.ws.rs + jboss-jaxrs-api_2.0_spec + + + org.jboss.resteasy + resteasy-jaxrs + + + commons-io + commons-io + 1.4 + + + ${app.server.tomcat.home}/lib + true + + + + + + org.codehaus.mojo + xml-maven-plugin + + + add-tomcat-manager-user + process-test-resources + + transform + + + + + ${app.server.tomcat.home}/conf + ${common.resources}/tomcat-users.xsl + + tomcat-users.xml + + ${app.server.tomcat.home}/conf + + + + + + + + + maven-antrun-plugin + + + parametrize-server-ports + process-test-resources + + run + + + + + 8005 + ${tomcat.server.port} + + + 8080 + ${tomcat.http.port} + + + 8443 + ${tomcat.server.port} + + + 8009 + ${tomcat.ajp.port} + + + + + + + + + + + + + + + + + maven-assembly-plugin + + + create-zip + package + + single + + + + ${assembly.xml} + + false + + + + + + + + + + app-server-saml-supported + + + src/saml-adapter-supported + + + + true + + + + + maven-enforcer-plugin + + + + enforce + + + + + app.server.saml.adapter.artifactId + + + + + + + + maven-dependency-plugin + + + unpack-saml-adapter + generate-resources + + unpack + + + + + org.keycloak + ${app.server.saml.adapter.artifactId} + ${project.version} + zip + ${app.server.tomcat.home}/lib + + + + + + + + + + + + app-server-tomcat7 + + tomcat7 + + + + app-server-tomcat8 + + tomcat8 + + + + app-server-tomcat9 + + tomcat9 + + + + + + + diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/pom.xml b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/pom.xml new file mode 100644 index 0000000000..24b1d71360 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/pom.xml @@ -0,0 +1,44 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-tomcat + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-tomcat7 + pom + App Server - Tomcat - Tomcat 7 + + + tomcat7 + + org.apache.tomcat + tomcat + ${tomcat7.version} + apache-tomcat-${tomcat7.version} + + keycloak-tomcat7-adapter-dist + keycloak-saml-tomcat7-adapter-dist + + + diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/saml-adapter-supported b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/saml-adapter-supported new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat7/src/saml-adapter-supported @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/pom.xml b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/pom.xml new file mode 100644 index 0000000000..929c1352ad --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/pom.xml @@ -0,0 +1,44 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-tomcat + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-tomcat8 + pom + App Server - Tomcat - Tomcat 8 + + + tomcat8 + + org.apache.tomcat + tomcat + ${tomcat8.version} + apache-tomcat-${tomcat8.version} + + keycloak-tomcat8-adapter-dist + keycloak-saml-tomcat8-adapter-dist + + + diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/saml-adapter-supported b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/saml-adapter-supported new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat8/src/saml-adapter-supported @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/pom.xml b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/pom.xml new file mode 100644 index 0000000000..8b58b525f2 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/pom.xml @@ -0,0 +1,44 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-app-server-tomcat + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-app-server-tomcat9 + pom + App Server - Tomcat - Tomcat 9 + + + tomcat9 + + org.apache.tomcat + tomcat + ${tomcat9.version} + apache-tomcat-${tomcat9.version} + + keycloak-tomcat8-adapter-dist + keycloak-saml-tomcat8-adapter-dist + + + diff --git a/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/saml-adapter-supported b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/saml-adapter-supported new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/testsuite/integration-arquillian/servers/app-server/tomcat/tomcat9/src/saml-adapter-supported @@ -0,0 +1 @@ + diff --git a/testsuite/integration-arquillian/servers/auth-server/README.md b/testsuite/integration-arquillian/servers/auth-server/README.md new file mode 100644 index 0000000000..87f9a2072a --- /dev/null +++ b/testsuite/integration-arquillian/servers/auth-server/README.md @@ -0,0 +1,44 @@ +# Keycloak Arquillian Integration TestSuite - Test Servers + +[Up...](../README.md) + +## Auth Server - JBoss `auth-server/jboss` + +### Modules + +* __`wildfly` Wildfly 10__ + - Builds keycloak server on top of latest Wildfly. + - Activated by __`-Pauth-server-wildfly`__ + +* __`eap` EAP 7__ + - Builds keycloak server on top of latest EAP. + - Activated by __`-Pauth-server-eap`__ + - Requires access to product repo. + - Requires additional properties: + - `product.version` + - `product.unpacked.folder.name` + +### Server dist vs overlay + +By default `keycloak-server-dist` artifact is used for the build. +By setting `-Dserver-overlay=true` you can switch to server overlay instead. See profile `server-overlay`. + +### JPA + +Configures Keycloak JDBC datasource in `standalone.xml`. See profile `jpa`. + +### SSL + +Configures SSL in `standalone.xml`. See profile `ssl`. + +### Cluster + +Configures in `standalone-ha.xml`: +- h2 datasource over TCP +- parameters of Keycloak Infinispan caches + +See profile `auth-server-cluster`. + +## Auth Server - Undertow `auth-server/undertow` + +Arquillian extension for running Keycloak server in embedded Undertow. diff --git a/testsuite/integration-arquillian/servers/wildfly/assembly.xml b/testsuite/integration-arquillian/servers/auth-server/jboss/assembly.xml similarity index 79% rename from testsuite/integration-arquillian/servers/wildfly/assembly.xml rename to testsuite/integration-arquillian/servers/auth-server/jboss/assembly.xml index 02a23286f9..47b82154db 100644 --- a/testsuite/integration-arquillian/servers/wildfly/assembly.xml +++ b/testsuite/integration-arquillian/servers/auth-server/jboss/assembly.xml @@ -17,7 +17,7 @@ - auth-server-wildfly + ${auth.server.jboss} zip @@ -27,15 +27,15 @@ - ${keycloak.server.home} - keycloak-${project.version} + ${auth.server.home} + auth-server-${auth.server.jboss} **/*.sh - ${keycloak.server.home} - keycloak-${project.version} + ${auth.server.home} + auth-server-${auth.server.jboss} **/*.sh diff --git a/testsuite/integration-arquillian/servers/eap7/src/main/xslt/add-dialect-logger.xsl b/testsuite/integration-arquillian/servers/auth-server/jboss/common/add-dialect-logger.xsl similarity index 100% rename from testsuite/integration-arquillian/servers/eap7/src/main/xslt/add-dialect-logger.xsl rename to testsuite/integration-arquillian/servers/auth-server/jboss/common/add-dialect-logger.xsl diff --git a/testsuite/integration-arquillian/servers/eap7/src/main/xslt/datasource-jdbc-url.xsl b/testsuite/integration-arquillian/servers/auth-server/jboss/common/datasource-jdbc-url.xsl similarity index 100% rename from testsuite/integration-arquillian/servers/eap7/src/main/xslt/datasource-jdbc-url.xsl rename to testsuite/integration-arquillian/servers/auth-server/jboss/common/datasource-jdbc-url.xsl diff --git a/testsuite/integration-arquillian/servers/wildfly/src/main/xslt/datasource.xsl b/testsuite/integration-arquillian/servers/auth-server/jboss/common/datasource.xsl similarity index 100% rename from testsuite/integration-arquillian/servers/wildfly/src/main/xslt/datasource.xsl rename to testsuite/integration-arquillian/servers/auth-server/jboss/common/datasource.xsl diff --git a/testsuite/integration-arquillian/servers/eap7/src/main/xslt/ispn-cache-owners.xsl b/testsuite/integration-arquillian/servers/auth-server/jboss/common/ispn-cache-owners.xsl similarity index 100% rename from testsuite/integration-arquillian/servers/eap7/src/main/xslt/ispn-cache-owners.xsl rename to testsuite/integration-arquillian/servers/auth-server/jboss/common/ispn-cache-owners.xsl diff --git a/testsuite/integration-arquillian/servers/eap7/src/main/keystore/keycloak.jks b/testsuite/integration-arquillian/servers/auth-server/jboss/common/keystore/keycloak.jks similarity index 100% rename from testsuite/integration-arquillian/servers/eap7/src/main/keystore/keycloak.jks rename to testsuite/integration-arquillian/servers/auth-server/jboss/common/keystore/keycloak.jks diff --git a/testsuite/integration-arquillian/servers/wildfly/src/main/keystore/keycloak.truststore b/testsuite/integration-arquillian/servers/auth-server/jboss/common/keystore/keycloak.truststore similarity index 100% rename from testsuite/integration-arquillian/servers/wildfly/src/main/keystore/keycloak.truststore rename to testsuite/integration-arquillian/servers/auth-server/jboss/common/keystore/keycloak.truststore diff --git a/testsuite/integration-arquillian/servers/wildfly/src/main/xslt/security.xsl b/testsuite/integration-arquillian/servers/auth-server/jboss/common/security.xsl similarity index 100% rename from testsuite/integration-arquillian/servers/wildfly/src/main/xslt/security.xsl rename to testsuite/integration-arquillian/servers/auth-server/jboss/common/security.xsl diff --git a/testsuite/integration-arquillian/servers/auth-server/jboss/eap/pom.xml b/testsuite/integration-arquillian/servers/auth-server/jboss/eap/pom.xml new file mode 100644 index 0000000000..53788ded80 --- /dev/null +++ b/testsuite/integration-arquillian/servers/auth-server/jboss/eap/pom.xml @@ -0,0 +1,74 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-auth-server-jboss + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + pom + + integration-arquillian-servers-auth-server-eap + + Auth Server - JBoss - EAP + + + eap + + + ${product.version} + ${product.unpacked.folder.name} + + + ${product.version} + org.jboss.eap + ${eap.version} + jboss-eap-7.0 + + + + + + maven-enforcer-plugin + + + enforce-auth-server-jboss-profile + + enforce + + + + + product.version + + + product.unpacked.folder.name + + + + + + + + + + diff --git a/testsuite/integration-arquillian/servers/eap7/src/main/xslt/module.xsl b/testsuite/integration-arquillian/servers/auth-server/jboss/eap/src/main/resources/xslt/module.xsl similarity index 100% rename from testsuite/integration-arquillian/servers/eap7/src/main/xslt/module.xsl rename to testsuite/integration-arquillian/servers/auth-server/jboss/eap/src/main/resources/xslt/module.xsl diff --git a/testsuite/integration-arquillian/servers/auth-server/jboss/pom.xml b/testsuite/integration-arquillian/servers/auth-server/jboss/pom.xml new file mode 100644 index 0000000000..97a18f1db8 --- /dev/null +++ b/testsuite/integration-arquillian/servers/auth-server/jboss/pom.xml @@ -0,0 +1,496 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-auth-server + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + pom + + integration-arquillian-servers-auth-server-jboss + + Auth Server - JBoss + + + ${project.parent.basedir}/common + ${project.parent.basedir}/assembly.xml + + + org.keycloak + keycloak-server-dist + ${project.version} + keycloak-${auth.server.dist.version} + + + org.keycloak + keycloak-server-overlay + ${project.version} + + org.wildfly + wildfly-dist + ${wildfly.version} + wildfly-${overlaid.container.version} + + + ${auth.server.dist.groupId} + ${auth.server.dist.artifactId} + ${auth.server.dist.version} + + ${project.build.directory}/unpacked/${auth.server.dist.unpacked.folder.name} + + + + + + auth-server-jboss-submodules + + + src + + + + + + maven-deploy-plugin + + true + + + + maven-dependency-plugin + + + unpack-server-or-overlay + generate-resources + + unpack + + + + + ${unpacked.artifact.groupId} + ${unpacked.artifact.artifactId} + ${unpacked.artifact.version} + zip + ${project.build.directory}/unpacked + + + + + + + + maven-enforcer-plugin + + + maven-antrun-plugin + + + org.codehaus.mojo + xml-maven-plugin + + + maven-resources-plugin + + + maven-assembly-plugin + + + create-zip + package + + single + + + + ${assembly.xml} + + false + + + + + + + + + + + + server-overlay + + + server-overlay + + + + + ${auth.server.overlay.groupId} + ${auth.server.overlay.artifactId} + ${auth.server.overlay.version} + ${project.build.directory}/unpacked/${overlaid.container.unpacked.folder.name} + + + + + + maven-dependency-plugin + + + unpack-overlaid-container + generate-resources + + unpack + + + + + ${overlaid.container.groupId} + ${overlaid.container.artifactId} + ${overlaid.container.version} + zip + ${auth.server.home} + + + + + + + + maven-antrun-plugin + 1.8 + + + move-standalone-keycloak-xml + process-resources + + run + + + + + + + + + + + + + + + + ssl + + + auth.server.ssl.required + + + + + + + org.codehaus.mojo + xml-maven-plugin + + + configure-adapter-subsystem-security + process-resources + + transform + + + + + ${auth.server.home}/standalone/configuration + + standalone.xml + + ${common.resources}/security.xsl + ${auth.server.home}/standalone/configuration + + + + + + + + maven-resources-plugin + + + copy-keystore + process-resources + + copy-resources + + + ${auth.server.home}/standalone/configuration + + + ${common.resources}/keystore + + keycloak.jks + keycloak.truststore + + + + + + + + + + + + + + jpa + + ${auth.server.home}/modules/system/layers/base/com/${jdbc.mvn.artifactId}/main + + + + + + maven-enforcer-plugin + + + enforce-properties + + enforce + + + + + jdbc.mvn.groupId + + + jdbc.mvn.artifactId + + + jdbc.mvn.version + + + keycloak.connectionsJpa.url + + + keycloak.connectionsJpa.user + + + keycloak.connectionsJpa.password + + + + + + + + maven-dependency-plugin + + + jdbc-driver + process-resources + + copy + + + + + ${jdbc.mvn.groupId} + ${jdbc.mvn.artifactId} + ${jdbc.mvn.version} + jar + + + ${jdbc.mvn.driver.deployment.dir} + true + + + + + + org.codehaus.mojo + xml-maven-plugin + + + configure-wildfly-datasource + process-resources + + transform + + + + + + ${auth.server.home}/modules/system/layers/base/com/h2database/h2/main + src/main/resources/module.xsl + + module.xml + + ${jdbc.mvn.driver.deployment.dir} + + + database + ${jdbc.mvn.artifactId} + + + version + ${jdbc.mvn.version} + + + + + + ${auth.server.home}/standalone/configuration + ${common.resources}/datasource.xsl + + standalone.xml + + ${auth.server.home}/standalone/configuration + + + jdbc.url + ${keycloak.connectionsJpa.url} + + + driver + ${jdbc.mvn.artifactId} + + + username + ${keycloak.connectionsJpa.user} + + + password + ${keycloak.connectionsJpa.password} + + + + + + ${auth.server.home}/standalone/configuration + ${common.resources}/add-dialect-logger.xsl + + standalone.xml + + ${auth.server.home}/standalone/configuration + + + + + + + + + + + + + auth-server-cluster + + 1 + 1 + 1 + + + + + + org.codehaus.mojo + xml-maven-plugin + + + configure-wildfly-datasource + process-resources + + transform + + + + + + ${auth.server.home}/standalone/configuration + + standalone-ha.xml + + ${common.resources}/datasource-jdbc-url.xsl + ${auth.server.home}/standalone/configuration + + + pool.name + KeycloakDS + + + jdbc.url + jdbc:h2:tcp://${jboss.bind.address:localhost}:9092/mem:keycloak;DB_CLOSE_DELAY=-1 + + + + + ${auth.server.home}/standalone/configuration + + standalone-ha.xml + + ${common.resources}/ispn-cache-owners.xsl + ${auth.server.home}/standalone/configuration + + + sessionCacheOwners + ${session.cache.owners} + + + offlineSessionCacheOwners + ${offline.session.cache.owners} + + + loginFailureCacheOwners + ${login.failure.cache.owners} + + + + + + + + + + + + + + + auth-server-wildfly + + wildfly + + + + auth-server-eap + + eap + + + + + diff --git a/testsuite/integration-arquillian/servers/auth-server/jboss/wildfly/pom.xml b/testsuite/integration-arquillian/servers/auth-server/jboss/wildfly/pom.xml new file mode 100644 index 0000000000..700a5196e8 --- /dev/null +++ b/testsuite/integration-arquillian/servers/auth-server/jboss/wildfly/pom.xml @@ -0,0 +1,38 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-auth-server-jboss + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + pom + + integration-arquillian-servers-auth-server-wildfly + + Auth Server - JBoss - Wildfly + + + wildfly + + + diff --git a/testsuite/integration-arquillian/servers/wildfly/src/main/xslt/module.xsl b/testsuite/integration-arquillian/servers/auth-server/jboss/wildfly/src/main/xslt/module.xsl similarity index 100% rename from testsuite/integration-arquillian/servers/wildfly/src/main/xslt/module.xsl rename to testsuite/integration-arquillian/servers/auth-server/jboss/wildfly/src/main/xslt/module.xsl diff --git a/testsuite/integration-arquillian/servers/auth-server/pom.xml b/testsuite/integration-arquillian/servers/auth-server/pom.xml new file mode 100644 index 0000000000..c54f112511 --- /dev/null +++ b/testsuite/integration-arquillian/servers/auth-server/pom.xml @@ -0,0 +1,37 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-auth-server + pom + Auth Server + + + jboss + undertow + + + diff --git a/testsuite/integration-arquillian/servers/auth-server/undertow/pom.xml b/testsuite/integration-arquillian/servers/auth-server/undertow/pom.xml new file mode 100644 index 0000000000..3379fcc7eb --- /dev/null +++ b/testsuite/integration-arquillian/servers/auth-server/undertow/pom.xml @@ -0,0 +1,71 @@ + + + + + + org.keycloak.testsuite + integration-arquillian-servers-auth-server + 2.0.0.CR1-SNAPSHOT + + 4.0.0 + + integration-arquillian-servers-auth-server-undertow + Auth Server - Undertow + + + + org.jboss.arquillian.junit + arquillian-junit-container + + + org.jboss.arquillian.container + undertow-embedded + 1.0.0.Alpha1-SNAPSHOT + + + org.jboss.resteasy + resteasy-jaxrs + + + log4j + log4j + + + org.slf4j + slf4j-api + + + org.slf4j + slf4j-simple + + + + + org.jboss.resteasy + resteasy-undertow + compile + + + org.keycloak + keycloak-dependencies-server-all + pom + + + + diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/undertow/CustomUndertowContainer.java b/testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/KeycloakOnUndertow.java similarity index 93% rename from testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/undertow/CustomUndertowContainer.java rename to testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/KeycloakOnUndertow.java index f634ad92ce..005b2ad4ac 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/undertow/CustomUndertowContainer.java +++ b/testsuite/integration-arquillian/servers/auth-server/undertow/src/main/java/org/keycloak/testsuite/arquillian/undertow/KeycloakOnUndertow.java @@ -43,12 +43,12 @@ import javax.servlet.DispatcherType; import java.util.Collection; import java.util.Map; -public class CustomUndertowContainer implements DeployableContainer { +public class KeycloakOnUndertow implements DeployableContainer { protected final Logger log = Logger.getLogger(this.getClass()); private UndertowJaxrsServer undertow; - private CustomUndertowContainerConfiguration configuration; + private KeycloakOnUndertowConfiguration configuration; private DeploymentInfo createAuthServerDeploymentInfo() { ResteasyDeployment deployment = new ResteasyDeployment(); @@ -101,8 +101,8 @@ public class CustomUndertowContainer implements DeployableContainer getConfigurationClass() { - return CustomUndertowContainerConfiguration.class; + public Class getConfigurationClass() { + return KeycloakOnUndertowConfiguration.class; } @Override @@ -112,7 +112,7 @@ public class CustomUndertowContainer implements DeployableContainer - - - - - org.keycloak.testsuite - integration-arquillian-servers - 2.0.0.CR1-SNAPSHOT - - 4.0.0 - - integration-arquillian-server-eap7 - pom - Server on EAP 7 - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - - - - auth-server-eap7 - - ${project.build.directory}/unpacked/${unpacked.container.folder.name} - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-properties - - enforce - - - - - version.server.dist - - - unpacked.container.folder.name - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-server - generate-resources - - unpack - - - - - org.keycloak - keycloak-server-dist - ${version.server.dist} - zip - ${project.build.directory}/unpacked - - - - - - - - maven-assembly-plugin - - - create-zip - package - - single - - - - assembly.xml - - false - - - - - - - - - - ssl - - - auth.server.ssl.required - - - - - - org.codehaus.mojo - xml-maven-plugin - - - configure-adapter-subsystem-security - process-resources - - transform - - - - - ${keycloak.server.home}/standalone/configuration - - standalone.xml - - src/main/xslt/security.xsl - ${keycloak.server.home}/standalone/configuration - - - - - - - - maven-resources-plugin - 2.7 - - - copy-keystore - process-resources - - copy-resources - - - ${keycloak.server.home}/standalone/configuration - - - src/main/keystore - - keycloak.jks - keycloak.truststore - - - - - - - - - - - - jpa - - ${keycloak.server.home}/modules/system/layers/base/com/${jdbc.mvn.artifactId}/main - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-properties - - enforce - - - - - jdbc.mvn.groupId - - - jdbc.mvn.artifactId - - - jdbc.mvn.version - - - keycloak.connectionsJpa.url - - - keycloak.connectionsJpa.user - - - keycloak.connectionsJpa.password - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - jdbc-driver - process-resources - - copy - - - - - ${jdbc.mvn.groupId} - ${jdbc.mvn.artifactId} - ${jdbc.mvn.version} - jar - - - ${jdbc.mvn.driver.deployment.dir} - true - - - - - - org.codehaus.mojo - xml-maven-plugin - - - configure-datasource - process-resources - - transform - - - - - ${keycloak.server.home}/modules/system/layers/base/com/h2database/h2/main - src/main/xslt/module.xsl - - module.xml - - ${jdbc.mvn.driver.deployment.dir} - - - database - ${jdbc.mvn.artifactId} - - - version - ${jdbc.mvn.version} - - - - - ${keycloak.server.home}/standalone/configuration - src/main/xslt/datasource.xsl - - standalone.xml - - ${keycloak.server.home}/standalone/configuration - - - jdbc.url - ${keycloak.connectionsJpa.url} - - - driver - ${jdbc.mvn.artifactId} - - - username - ${keycloak.connectionsJpa.user} - - - password - ${keycloak.connectionsJpa.password} - - - - - ${keycloak.server.home}/standalone/configuration - src/main/xslt/add-dialect-logger.xsl - - standalone.xml - - ${keycloak.server.home}/standalone/configuration - - - - - - - - - - - - auth-server-eap7-cluster - - 1 - 1 - 1 - - - - - org.codehaus.mojo - xml-maven-plugin - - - configure-wildfly-datasource - process-resources - - transform - - - - - - ${keycloak.server.home}/standalone/configuration - - standalone-ha.xml - - src/main/xslt/datasource-jdbc-url.xsl - ${keycloak.server.home}/standalone/configuration - - - pool.name - KeycloakDS - - - jdbc.url - jdbc:h2:tcp://${jboss.bind.address:localhost}:9092/mem:keycloak;DB_CLOSE_DELAY=-1 - - - - - ${keycloak.server.home}/standalone/configuration - - standalone-ha.xml - - src/main/xslt/ispn-cache-owners.xsl - ${keycloak.server.home}/standalone/configuration - - - sessionCacheOwners - ${session.cache.owners} - - - offlineSessionCacheOwners - ${offline.session.cache.owners} - - - loginFailureCacheOwners - ${login.failure.cache.owners} - - - - - - - - - - - - - - diff --git a/testsuite/integration-arquillian/servers/eap7/src/main/xslt/datasource.xsl b/testsuite/integration-arquillian/servers/eap7/src/main/xslt/datasource.xsl deleted file mode 100644 index bf199cb88a..0000000000 --- a/testsuite/integration-arquillian/servers/eap7/src/main/xslt/datasource.xsl +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/eap7/src/main/xslt/security.xsl b/testsuite/integration-arquillian/servers/eap7/src/main/xslt/security.xsl deleted file mode 100644 index e20462bd75..0000000000 --- a/testsuite/integration-arquillian/servers/eap7/src/main/xslt/security.xsl +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/migration/pom.xml b/testsuite/integration-arquillian/servers/migration/pom.xml index 49aeff431b..36d53a7072 100644 --- a/testsuite/integration-arquillian/servers/migration/pom.xml +++ b/testsuite/integration-arquillian/servers/migration/pom.xml @@ -21,7 +21,7 @@ org.keycloak.testsuite integration-arquillian-servers - 1.9.0.CR1-SNAPSHOT + 2.0.0.CR1-SNAPSHOT 4.0.0 diff --git a/testsuite/integration-arquillian/servers/migration/wildfly_kc12/assembly.xml b/testsuite/integration-arquillian/servers/migration/wildfly_kc12/assembly.xml index d3fc3db84e..cc9969730e 100644 --- a/testsuite/integration-arquillian/servers/migration/wildfly_kc12/assembly.xml +++ b/testsuite/integration-arquillian/servers/migration/wildfly_kc12/assembly.xml @@ -17,7 +17,7 @@ - auth-server-wildfly-kc14 + auth-server-jboss-kc14 zip diff --git a/testsuite/integration-arquillian/servers/migration/wildfly_kc12/pom.xml b/testsuite/integration-arquillian/servers/migration/wildfly_kc12/pom.xml index 1d080cf2b2..507cd65584 100644 --- a/testsuite/integration-arquillian/servers/migration/wildfly_kc12/pom.xml +++ b/testsuite/integration-arquillian/servers/migration/wildfly_kc12/pom.xml @@ -21,7 +21,7 @@ org.keycloak.testsuite integration-arquillian-migration-servers - 1.9.0.CR1-SNAPSHOT + 2.0.0.CR1-SNAPSHOT 4.0.0 diff --git a/testsuite/integration-arquillian/servers/migration/wildfly_kc13/assembly.xml b/testsuite/integration-arquillian/servers/migration/wildfly_kc13/assembly.xml index 0ee1a4de96..cd48ba2349 100644 --- a/testsuite/integration-arquillian/servers/migration/wildfly_kc13/assembly.xml +++ b/testsuite/integration-arquillian/servers/migration/wildfly_kc13/assembly.xml @@ -17,7 +17,7 @@ - auth-server-wildfly-kc14 + auth-server-jboss-kc14 zip diff --git a/testsuite/integration-arquillian/servers/migration/wildfly_kc13/pom.xml b/testsuite/integration-arquillian/servers/migration/wildfly_kc13/pom.xml index ee806c4915..210225c09c 100644 --- a/testsuite/integration-arquillian/servers/migration/wildfly_kc13/pom.xml +++ b/testsuite/integration-arquillian/servers/migration/wildfly_kc13/pom.xml @@ -21,7 +21,7 @@ org.keycloak.testsuite integration-arquillian-migration-servers - 1.9.0.CR1-SNAPSHOT + 2.0.0.CR1-SNAPSHOT 4.0.0 diff --git a/testsuite/integration-arquillian/servers/migration/wildfly_kc14/assembly.xml b/testsuite/integration-arquillian/servers/migration/wildfly_kc14/assembly.xml index 5cff675eb6..deac59de4f 100644 --- a/testsuite/integration-arquillian/servers/migration/wildfly_kc14/assembly.xml +++ b/testsuite/integration-arquillian/servers/migration/wildfly_kc14/assembly.xml @@ -17,7 +17,7 @@ - auth-server-wildfly-kc14 + auth-server-jboss-kc14 zip diff --git a/testsuite/integration-arquillian/servers/migration/wildfly_kc14/pom.xml b/testsuite/integration-arquillian/servers/migration/wildfly_kc14/pom.xml index 5ce1f6b3f7..91a6520478 100644 --- a/testsuite/integration-arquillian/servers/migration/wildfly_kc14/pom.xml +++ b/testsuite/integration-arquillian/servers/migration/wildfly_kc14/pom.xml @@ -21,7 +21,7 @@ org.keycloak.testsuite integration-arquillian-migration-servers - 1.9.0.CR1-SNAPSHOT + 2.0.0.CR1-SNAPSHOT 4.0.0 diff --git a/testsuite/integration-arquillian/servers/migration/wildfly_kc15/assembly.xml b/testsuite/integration-arquillian/servers/migration/wildfly_kc15/assembly.xml index d451b8100f..b7330e32b2 100644 --- a/testsuite/integration-arquillian/servers/migration/wildfly_kc15/assembly.xml +++ b/testsuite/integration-arquillian/servers/migration/wildfly_kc15/assembly.xml @@ -17,7 +17,7 @@ - auth-server-wildfly-kc15 + auth-server-jboss-kc15 zip diff --git a/testsuite/integration-arquillian/servers/migration/wildfly_kc15/pom.xml b/testsuite/integration-arquillian/servers/migration/wildfly_kc15/pom.xml index 5f3eb9e3c8..85f9063999 100644 --- a/testsuite/integration-arquillian/servers/migration/wildfly_kc15/pom.xml +++ b/testsuite/integration-arquillian/servers/migration/wildfly_kc15/pom.xml @@ -21,7 +21,7 @@ org.keycloak.testsuite integration-arquillian-migration-servers - 1.9.0.CR1-SNAPSHOT + 2.0.0.CR1-SNAPSHOT 4.0.0 diff --git a/testsuite/integration-arquillian/servers/migration/wildfly_kc16/assembly.xml b/testsuite/integration-arquillian/servers/migration/wildfly_kc16/assembly.xml index c4392901a9..2e08956694 100644 --- a/testsuite/integration-arquillian/servers/migration/wildfly_kc16/assembly.xml +++ b/testsuite/integration-arquillian/servers/migration/wildfly_kc16/assembly.xml @@ -17,7 +17,7 @@ - auth-server-wildfly-kc16 + auth-server-jboss-kc16 zip diff --git a/testsuite/integration-arquillian/servers/migration/wildfly_kc16/pom.xml b/testsuite/integration-arquillian/servers/migration/wildfly_kc16/pom.xml index cc057c966f..2ca3311d99 100644 --- a/testsuite/integration-arquillian/servers/migration/wildfly_kc16/pom.xml +++ b/testsuite/integration-arquillian/servers/migration/wildfly_kc16/pom.xml @@ -21,7 +21,7 @@ org.keycloak.testsuite integration-arquillian-migration-servers - 1.9.0.CR1-SNAPSHOT + 2.0.0.CR1-SNAPSHOT 4.0.0 diff --git a/testsuite/integration-arquillian/servers/pom.xml b/testsuite/integration-arquillian/servers/pom.xml index 81affa2c9e..383317692f 100644 --- a/testsuite/integration-arquillian/servers/pom.xml +++ b/testsuite/integration-arquillian/servers/pom.xml @@ -1,20 +1,20 @@ +~ Copyright 2016 Red Hat, Inc. and/or its affiliates +~ and other contributors as indicated by the @author tags. +~ +~ Licensed under the Apache License, Version 2.0 (the "License"); +~ you may not use this file except in compliance with the License. +~ You may obtain a copy of the License at +~ +~ http://www.apache.org/licenses/LICENSE-2.0 +~ +~ Unless required by applicable law or agreed to in writing, software +~ distributed under the License is distributed on an "AS IS" BASIS, +~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +~ See the License for the specific language governing permissions and +~ limitations under the License. +--> @@ -29,38 +29,51 @@ pom Servers - - - - + + sh + + + 9.0.2.Final + 8.2.1.Final + 7.0.0.ER6-redhat-1 + 7.5.6.Final-redhat-2 + 7.1.1.Final + 7.5.6.Final-redhat-2 + 7.0.68 + 8.0.32 + 9.0.0.M3 + 3.0.3 + 6.1.0.redhat-379 + + 6.2.1.redhat-084 + + + + + auth-server + app-server + + - auth-server-wildfly + auth-server-cluster - wildfly - - - - auth-server-wildfly-cluster - - wildfly wildfly-balancer - auth-server-eap7 - - eap7 - + win + + + Windows + + + + bat + - - auth-server-eap7-cluster - - eap7 - wildfly-balancer - - - + + diff --git a/testsuite/integration-arquillian/servers/wildfly-balancer/assembly.xml b/testsuite/integration-arquillian/servers/wildfly-balancer/assembly.xml index a3e36ae773..50238d4f7d 100644 --- a/testsuite/integration-arquillian/servers/wildfly-balancer/assembly.xml +++ b/testsuite/integration-arquillian/servers/wildfly-balancer/assembly.xml @@ -17,7 +17,7 @@ - wildfly-balancer + balancer-wildfly zip @@ -28,14 +28,14 @@ ${wildfly.balancer.home} - wildfly-balancer-${project.version} + balancer-wildfly **/*.sh ${wildfly.balancer.home} - wildfly-balancer-${project.version} + balancer-wildfly **/*.sh diff --git a/testsuite/integration-arquillian/servers/wildfly-balancer/pom.xml b/testsuite/integration-arquillian/servers/wildfly-balancer/pom.xml index 84d6638b38..262299c678 100644 --- a/testsuite/integration-arquillian/servers/wildfly-balancer/pom.xml +++ b/testsuite/integration-arquillian/servers/wildfly-balancer/pom.xml @@ -36,7 +36,6 @@ - org.apache.maven.plugins maven-deploy-plugin true @@ -44,7 +43,6 @@ - org.apache.maven.plugins maven-dependency-plugin diff --git a/testsuite/integration-arquillian/servers/wildfly-balancer/src/main/xslt/mod_cluster.xsl b/testsuite/integration-arquillian/servers/wildfly-balancer/src/main/xslt/mod_cluster.xsl index 9cb3774a74..2079fc90f4 100644 --- a/testsuite/integration-arquillian/servers/wildfly-balancer/src/main/xslt/mod_cluster.xsl +++ b/testsuite/integration-arquillian/servers/wildfly-balancer/src/main/xslt/mod_cluster.xsl @@ -60,7 +60,7 @@ - + diff --git a/testsuite/integration-arquillian/servers/wildfly/pom.xml b/testsuite/integration-arquillian/servers/wildfly/pom.xml deleted file mode 100644 index 5607d94cd2..0000000000 --- a/testsuite/integration-arquillian/servers/wildfly/pom.xml +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-servers - 2.0.0.CR1-SNAPSHOT - - 4.0.0 - - integration-arquillian-server-wildfly - pom - Server on Wildfly - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - maven-assembly-plugin - - - create-zip - package - - single - - - - assembly.xml - - false - - - - - - - - - - server-overlay - - - server-overlay - - - - ${project.build.directory}/unpacked/wildfly-${wildfly.version} - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-wildfly-and-server-overlay - generate-resources - - unpack - - - - - org.wildfly - wildfly-dist - ${wildfly.version} - zip - ${project.build.directory}/unpacked - - - org.keycloak - keycloak-server-overlay - ${project.version} - zip - ${keycloak.server.home} - - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 1.8 - - - move-standalone-keycloak-xml - process-resources - - run - - - - - - - - - - - - - - - server-dist - - - !server-overlay - - - - ${project.build.directory}/unpacked/keycloak-${project.version} - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-server - generate-resources - - unpack - - - - - org.keycloak - keycloak-server-dist - ${project.version} - zip - ${project.build.directory}/unpacked - - - - - - - - - - - - adapter-libs-provided - - - !adapter.libs.bundled - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-adapter - generate-resources - - unpack - - - - - org.keycloak - keycloak-wildfly-adapter-dist - ${project.version} - zip - ${keycloak.server.home} - - - org.keycloak - keycloak-saml-wildfly-adapter-dist - ${project.version} - zip - ${keycloak.server.home} - - - - - - - - - - - ssl - - - auth.server.ssl.required - - - - - - org.codehaus.mojo - xml-maven-plugin - - - configure-adapter-subsystem-security - process-resources - - transform - - - - - ${keycloak.server.home}/standalone/configuration - - standalone.xml - - src/main/xslt/security.xsl - ${keycloak.server.home}/standalone/configuration - - - - - - - - maven-resources-plugin - - - copy-keystore - process-resources - - copy-resources - - - ${keycloak.server.home}/standalone/configuration - - - src/main/keystore - - keycloak.jks - keycloak.truststore - - - - - - - - - - - - jpa - - ${keycloak.server.home}/modules/system/layers/base/com/${jdbc.mvn.artifactId}/main - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-properties - - enforce - - - - - jdbc.mvn.groupId - - - jdbc.mvn.artifactId - - - jdbc.mvn.version - - - keycloak.connectionsJpa.url - - - keycloak.connectionsJpa.user - - - keycloak.connectionsJpa.password - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - jdbc-driver - process-resources - - copy - - - - - ${jdbc.mvn.groupId} - ${jdbc.mvn.artifactId} - ${jdbc.mvn.version} - jar - - - ${jdbc.mvn.driver.deployment.dir} - true - - - - - - org.codehaus.mojo - xml-maven-plugin - - - configure-wildfly-datasource - process-resources - - transform - - - - - - ${keycloak.server.home}/modules/system/layers/base/com/h2database/h2/main - src/main/xslt/module.xsl - - module.xml - - ${jdbc.mvn.driver.deployment.dir} - - - database - ${jdbc.mvn.artifactId} - - - version - ${jdbc.mvn.version} - - - - - - ${keycloak.server.home}/standalone/configuration - src/main/xslt/datasource.xsl - - standalone.xml - - ${keycloak.server.home}/standalone/configuration - - - jdbc.url - ${keycloak.connectionsJpa.url} - - - driver - ${jdbc.mvn.artifactId} - - - username - ${keycloak.connectionsJpa.user} - - - password - ${keycloak.connectionsJpa.password} - - - - - - ${keycloak.server.home}/standalone/configuration - src/main/xslt/add-dialect-logger.xsl - - standalone.xml - - ${keycloak.server.home}/standalone/configuration - - - - - - - - - - - - auth-server-wildfly-cluster - - 1 - 1 - 1 - - - - - org.codehaus.mojo - xml-maven-plugin - - - configure-wildfly-datasource - process-resources - - transform - - - - - - ${keycloak.server.home}/standalone/configuration - - standalone-ha.xml - - src/main/xslt/datasource-jdbc-url.xsl - ${keycloak.server.home}/standalone/configuration - - - pool.name - KeycloakDS - - - jdbc.url - jdbc:h2:tcp://${jboss.bind.address:localhost}:9092/mem:keycloak;DB_CLOSE_DELAY=-1 - - - - - ${keycloak.server.home}/standalone/configuration - - standalone-ha.xml - - src/main/xslt/ispn-cache-owners.xsl - ${keycloak.server.home}/standalone/configuration - - - sessionCacheOwners - ${session.cache.owners} - - - offlineSessionCacheOwners - ${offline.session.cache.owners} - - - loginFailureCacheOwners - ${login.failure.cache.owners} - - - - - - - - - - - - - - diff --git a/testsuite/integration-arquillian/servers/wildfly/src/main/keystore/keycloak.jks b/testsuite/integration-arquillian/servers/wildfly/src/main/keystore/keycloak.jks deleted file mode 100644 index 81570ab52922e70c047bf56442ccce582af55539..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2233 zcmcgt`8(7L7oYE#jHMaI2&Kq!%ZzQTS;`(`OR}WFwPeXUN*YU2GuKE$t{A1P$x>t) zJ0U}gVQiVJ?E5}OE+Ss{KJR_r`xm@Foaa2Bb3Q+u=X1{UIr}U7DFvr!R?Q~ z?&g03AAI|;V(s_A9}fZ@0bz)cJq(VOqMcdl=AA29 znPJu}^_f1kNDY?gG+0WsamWy5&em}uPzeb}bQpfzVN7WG?)Q4Ce>D`M0qVBs1Izj3yYo{4iZ{k+ ze3S`AU6&YaUn~8d!LAiitH0CyXwVO#=6e1%hw|DTsX|qwWb~z>*oh+Q>lT80QJ$Q; z%5;r!b8>z5RG6k_Z+XO?GQsy_2)V4R#of5A&!fpcT*Gm!V`SS5O|)Oc^0`Lb`7Ez4 z`Sx*Bhr!9S1E2HR{JjcI^)PB$F9lWMNE?G}e3B>#;cxwUupszl$C~il7YbTrF}wWz z{-nZz*)u7cT-r@!Ef655tDS$zYLI8M-E?7TR7=7oC>XA+9#jg+2 z@{apwP3x(*f0s(*gW~Ih)@+frD^M3p*T-ZQV<^V7AcSlt*R#4P#QB^=3MxfY+USqrnWrSTB#981sqle!Hx}zb2isk-B zkKc*Md9}J*FHQ_MB4e_{J z zn*)6#OuoVGV#(NJeM9#VPb=jNV%<N+=JTL7LTVZ*idY+o?Gi$J?2h@6u=!b$(Hn;NrY~&2Pk=k&=d`d(mz&d`W(&cX1r z_ow%?Z`~%)*@7Z37~ZRqiR_ph|YHWba3h3jF-- zP5IqS%_}GuC#d+uj0e*Mlqo20Z>UyP^%n5dvAFk18SLIP5U@+w3?p7QI#>tH)W64`E0N_0|OfMx~3^yl-9fT7JwzK&Ma3R5# z`br24-(MXllIyBx@NEMAmWLAmp}QWIc#zO5o*t*MZnys-@glj*J;Sd1&n-|5>?2Uw+@<0h|vg~vfRR4f%xy!9L)N?jSx(S^L7XI$>l%&1TD zc>}pPuoN_aTROIOJ+|zfQ~XeNNi^2?7aSnXfwB{*dJsHmEL&*N-MFODlH+f@1?B)i zK&}Kv9CPY$ho|5WA&B7ROhi~JN*foOR8N&{De;i3)9U=Uh=+G{C?WvjNc^Ew9y-1M z;-z3U!Ky%Z)#{mp2=xItK{K;Vdl(gHf0P<1Y8=QaqOqfAl*3e!u;iZ zqn+r({M{6uUi$JxNakbH$&keRjb@c+ReA+R`Ro(>U+}bS6l2ajd-NwcM! - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/wildfly/src/main/xslt/datasource-jdbc-url.xsl b/testsuite/integration-arquillian/servers/wildfly/src/main/xslt/datasource-jdbc-url.xsl deleted file mode 100644 index 589ee4cc1d..0000000000 --- a/testsuite/integration-arquillian/servers/wildfly/src/main/xslt/datasource-jdbc-url.xsl +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/servers/wildfly/src/main/xslt/ispn-cache-owners.xsl b/testsuite/integration-arquillian/servers/wildfly/src/main/xslt/ispn-cache-owners.xsl deleted file mode 100644 index 7237d89868..0000000000 --- a/testsuite/integration-arquillian/servers/wildfly/src/main/xslt/ispn-cache-owners.xsl +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/pom.xml b/testsuite/integration-arquillian/tests/base/pom.xml index 70bf0df018..39d376a9c8 100644 --- a/testsuite/integration-arquillian/tests/base/pom.xml +++ b/testsuite/integration-arquillian/tests/base/pom.xml @@ -62,7 +62,6 @@ - org.apache.maven.plugins maven-jar-plugin 2.2 @@ -75,7 +74,6 @@ - org.apache.maven.plugins maven-surefire-plugin @@ -91,6 +89,25 @@ maven-resources-plugin + + copy-arquillian-xml + generate-resources + + copy-resources + + + ${project.build.directory}/dependency + + + src/test/resources + + arquillian.xml + + + + + + copy-admin-user-json-file process-resources @@ -98,7 +115,7 @@ copy-resources - ${jboss.server.config.dir} + ${auth.server.config.dir} src/test/resources diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java index 9dace92d7d..ea64fe24a1 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AppServerTestEnricher.java @@ -1,6 +1,5 @@ package org.keycloak.testsuite.arquillian; -import org.jboss.arquillian.container.spi.event.container.BeforeDeploy; import org.jboss.arquillian.container.test.api.ContainerController; import org.jboss.arquillian.core.api.Instance; import org.jboss.arquillian.core.api.InstanceProducer; @@ -18,10 +17,9 @@ import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; -import static org.keycloak.testsuite.arquillian.AuthServerTestEnricher.getAuthServerContextRoot; -import static org.keycloak.testsuite.arquillian.AuthServerTestEnricher.getAuthServerQualifier; import static org.keycloak.testsuite.util.IOUtil.execCommand; import static org.keycloak.testsuite.util.WaitUtils.pause; +import static org.keycloak.testsuite.arquillian.AuthServerTestEnricher.getAuthServerContextRoot; /** * @@ -44,7 +42,7 @@ public class AppServerTestEnricher { return annotatedClass == null ? null // no @AppServerContainer annotation --> no adapter test : (appServerQ == null || appServerQ.isEmpty() // @AppServerContainer annotation present but qualifier not set --> relative adapter test - ? getAuthServerQualifier() // app server == auth server + ? AuthServerTestEnricher.AUTH_SERVER_CONTAINER // app server == auth server : appServerQ); } @@ -100,28 +98,28 @@ public class AppServerTestEnricher { private Instance containerConrollerInstance; public void startAppServer(@Observes(precedence = -1) BeforeClass event) throws MalformedURLException, InterruptedException, IOException { - if (testContext.isAdapterTest()) { + if (testContext.isAdapterTest() && !testContext.isRelativeAdapterTest()) { ContainerController controller = containerConrollerInstance.get(); if (!controller.isStarted(testContext.getAppServerInfo().getQualifier())) { + log.info("Starting app server: " + testContext.getAppServerInfo().getQualifier()); controller.start(testContext.getAppServerInfo().getQualifier()); } } } - public void installAdapterLibs(@Observes BeforeDeploy event) { - log.debug("BEFORE DEPLOY - INSTALL ADAPTER LIBS"); - if (testContext.isAdapterTest()) { - // install adapter libs on JBoss-based container via CLI - if (testContext.getAppServerInfo().isJBossBased()) { - try { - installAdapterLibsUsingJBossCLIClient(testContext.getAppServerInfo()); - } catch (InterruptedException | IOException ex) { - throw new RuntimeException("Failed to install adapter libs.", ex); - } - } - } - } - +// public void installAdapterLibs(@Observes BeforeDeploy event) { +// log.debug("BEFORE DEPLOY - INSTALL ADAPTER LIBS"); +// if (testContext.isAdapterTest()) { +// // install adapter libs on JBoss-based container via CLI +// if (testContext.getAppServerInfo().isJBossBased()) { +// try { +// installAdapterLibsUsingJBossCLIClient(testContext.getAppServerInfo()); +// } catch (InterruptedException | IOException ex) { +// throw new RuntimeException("Failed to install adapter libs.", ex); +// } +// } +// } +// } private void installAdapterLibsUsingJBossCLIClient(ContainerInfo appServerInfo) throws InterruptedException, IOException { if (!appServerInfo.isAdapterLibsInstalled()) { @@ -160,7 +158,7 @@ public class AppServerTestEnricher { execCommand(command + " --connect --command=reload" + controllerArg, bin); log.info("Container restarted"); pause(5000); - if (System.getProperty("app.server.log.check","true").equals("true")) { + if (System.getProperty("app.server.log.check", "true").equals("true")) { LogChecker.checkJBossServerLog(jbossHomePath); } } @@ -179,7 +177,7 @@ public class AppServerTestEnricher { public static Class getNearestSuperclassWithAnnotation(Class testClass, Class annotationClass) { return testClass.isAnnotationPresent(annotationClass) ? testClass : (testClass.getSuperclass().equals(Object.class) ? null // stop recursion - : getNearestSuperclassWithAnnotation(testClass.getSuperclass(), annotationClass)); // continue recursion + : getNearestSuperclassWithAnnotation(testClass.getSuperclass(), annotationClass)); // continue recursion } public static boolean hasAppServerContainerAnnotation(Class testClass) { @@ -187,12 +185,12 @@ public class AppServerTestEnricher { } public static boolean isRelative(Class testClass) { - return getAppServerQualifier(testClass).equals(getAuthServerQualifier()); + return getAppServerQualifier(testClass).equals(AuthServerTestEnricher.AUTH_SERVER_CONTAINER); } public static String getAdapterLibsLocationProperty(Class testClass) { Class annotatedClass = getNearestSuperclassWithAnnotation(testClass, AdapterLibsLocationProperty.class); - return (annotatedClass == null ? null + return (annotatedClass == null ? "adapter.libs.home" : annotatedClass.getAnnotation(AdapterLibsLocationProperty.class).value()); } diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java index 9cbfce6e6a..a7238c3a24 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java @@ -57,10 +57,15 @@ public class AuthServerTestEnricher { @Inject private Event startContainerEvent; - private static final String AUTH_SERVER_CONTAINER_PROPERTY = "auth.server.container"; private static final String AUTH_SERVER_CONTAINER_DEFAULT = "auth-server-undertow"; + private static final String AUTH_SERVER_CONTAINER_PROPERTY = "auth.server.container"; + public static final String AUTH_SERVER_CONTAINER = System.getProperty(AUTH_SERVER_CONTAINER_PROPERTY, AUTH_SERVER_CONTAINER_DEFAULT); + + private static final String AUTH_SERVER_CLUSTER_PROPERTY = "auth.server.cluster"; + public static final boolean AUTH_SERVER_CLUSTER = Boolean.parseBoolean(System.getProperty(AUTH_SERVER_CLUSTER_PROPERTY, "false")); private static final String MIGRATED_AUTH_SERVER_CONTAINER_PROPERTY = "migrated.auth.server.container"; + public static final String MIGRATED_AUTH_SERVER_CONTAINER = System.getProperty(MIGRATED_AUTH_SERVER_CONTAINER_PROPERTY); // == null if migration not enabled @Inject @SuiteScoped @@ -71,14 +76,6 @@ public class AuthServerTestEnricher { @ClassScoped private InstanceProducer testContextProducer; - public static String getAuthServerQualifier() { - return System.getProperty(AUTH_SERVER_CONTAINER_PROPERTY, AUTH_SERVER_CONTAINER_DEFAULT); - } - - public static String getMigratedAuthServerQualifier() { - return System.getProperty(MIGRATED_AUTH_SERVER_CONTAINER_PROPERTY); // == null if migration not enabled - } - public static String getAuthServerContextRoot() { return getAuthServerContextRoot(0); } @@ -102,54 +99,38 @@ public class AuthServerTestEnricher { suiteContext = new SuiteContext(containers); - String authServerQualifier = getAuthServerQualifier(); - String migratedAuthServerQualifier = getMigratedAuthServerQualifier(); - - // init authServerInfo and authServerBackendsInfo - if (authServerQualifier.startsWith("auth-server-")) { - - boolean authServerCluster = authServerQualifier.endsWith("-cluster"); - - String authServerType = authServerQualifier.replaceAll("auth-server-", "").replaceAll("-cluster", ""); - - log.info("authServerType:" + authServerType); - - String authServerFrontend = authServerCluster - ? "auth-server-" + authServerType + "-balancer" // in cluster mode the load-balancer container serves as auth server frontend - : authServerQualifier; // single-node mode - String authServerBackend = "auth-server-" + authServerType + "-backend"; - int backends = 0; - for (ContainerInfo container : suiteContext.getContainers()) { - // frontend - if (container.getQualifier().equals(authServerFrontend)) { - updateWithAuthServerInfo(container); - suiteContext.setAuthServerInfo(container); - } - // backends - if (container.getQualifier().startsWith(authServerBackend)) { - updateWithAuthServerInfo(container, ++backends); - suiteContext.getAuthServerBackendsInfo().add(container); - } + String authServerFrontend = AUTH_SERVER_CLUSTER + ? "auth-server-balancer-wildfly" // if cluster mode enabled, load-balancer is the frontend + : AUTH_SERVER_CONTAINER; // single-node mode + String authServerBackend = AUTH_SERVER_CONTAINER + "-backend"; + int backends = 0; + for (ContainerInfo container : suiteContext.getContainers()) { + // frontend + if (container.getQualifier().equals(authServerFrontend)) { + updateWithAuthServerInfo(container); + suiteContext.setAuthServerInfo(container); } - - // validate auth server setup - if (suiteContext.getAuthServerInfo() == null) { - throw new RuntimeException(String.format("No auth server activated. A container matching '%s' needs to be enabled in arquillian.xml.", authServerFrontend)); + // backends + if (AUTH_SERVER_CLUSTER && container.getQualifier().startsWith(authServerBackend)) { + updateWithAuthServerInfo(container, ++backends); + suiteContext.getAuthServerBackendsInfo().add(container); } - if (authServerCluster && suiteContext.getAuthServerBackendsInfo().isEmpty()) { - throw new RuntimeException(String.format("No cluster backend nodes activated. Containers matching '%sN' need to be enabled in arquillian.xml.", authServerBackend)); - } - - } else { - throw new IllegalArgumentException(String.format("Value of %s should start with 'auth-server-' prefix.", AUTH_SERVER_CONTAINER_PROPERTY)); } - if (migratedAuthServerQualifier != null) { + // validate auth server setup + if (suiteContext.getAuthServerInfo() == null) { + throw new RuntimeException(String.format("No auth server container matching '%s' found in arquillian.xml.", authServerFrontend)); + } + if (AUTH_SERVER_CLUSTER && suiteContext.getAuthServerBackendsInfo().isEmpty()) { + throw new RuntimeException(String.format("No auth server container matching '%sN' found in arquillian.xml.", authServerBackend)); + } + + if (MIGRATED_AUTH_SERVER_CONTAINER != null) { // init migratedAuthServerInfo - if (migratedAuthServerQualifier.startsWith("migrated-auth-server-")) { + if (MIGRATED_AUTH_SERVER_CONTAINER.startsWith("migrated-auth-server-")) { for (ContainerInfo container : suiteContext.getContainers()) { // migrated auth server - if (container.getQualifier().equals(migratedAuthServerQualifier)) { + if (container.getQualifier().equals(MIGRATED_AUTH_SERVER_CONTAINER)) { updateWithAuthServerInfo(container); suiteContext.setMigratedAuthServerInfo(container); } @@ -160,7 +141,7 @@ public class AuthServerTestEnricher { // validate setup if (suiteContext.getMigratedAuthServerInfo() == null) { throw new RuntimeException(String.format("Migration test was enabled but no auth server from which to migrate was activated. " - + "A container matching '%s' needs to be enabled in arquillian.xml.", migratedAuthServerQualifier)); + + "A container matching '%s' needs to be enabled in arquillian.xml.", MIGRATED_AUTH_SERVER_CONTAINER)); } } @@ -201,6 +182,14 @@ public class AuthServerTestEnricher { LogChecker.checkJBossServerLog(jbossHomePath); } } +// +// public void startAuthServerContainer(@Observes BeforeSuite event) { +// startContainerEvent.fire(new StartContainer(suiteContext.getAuthServerInfo().getArquillianContainer())); +// } +// +// public void stopAuthServerContainer(@Observes AfterSuite event) { +// containerController.get().stop(suiteContext.getAuthServerInfo().getQualifier()); +// } public void initializeTestContext(@Observes(precedence = 2) BeforeClass event) { TestContext testContext = new TestContext(suiteContext, event.getTestClass().getJavaClass()); diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/KeycloakArquillianExtension.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/KeycloakArquillianExtension.java index 63f5436d39..899a73155f 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/KeycloakArquillianExtension.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/KeycloakArquillianExtension.java @@ -29,7 +29,6 @@ import org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider; import org.jboss.arquillian.test.spi.execution.TestExecutionDecider; import org.keycloak.testsuite.arquillian.h2.H2TestEnricher; import org.keycloak.testsuite.arquillian.migration.MigrationTestExecutionDecider; -import org.keycloak.testsuite.arquillian.undertow.CustomUndertowContainer; /** * @@ -53,9 +52,6 @@ public class KeycloakArquillianExtension implements LoadableExtension { .observer(AppServerTestEnricher.class) .observer(H2TestEnricher.class); - builder - .service(DeployableContainer.class, CustomUndertowContainer.class); - builder .service(TestExecutionDecider.class, MigrationTestExecutionDecider.class); diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/annotation/AdapterLibsLocationProperty.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/annotation/AdapterLibsLocationProperty.java index 371d732d39..18bcdcc8f2 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/annotation/AdapterLibsLocationProperty.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/annotation/AdapterLibsLocationProperty.java @@ -32,5 +32,5 @@ import java.lang.annotation.Target; @Target({ElementType.TYPE}) public @interface AdapterLibsLocationProperty { - String value(); + String value() default "adapter.libs.home"; } \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/Registry.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/Registry.java index 571daff214..c682597c9b 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/Registry.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/Registry.java @@ -67,7 +67,7 @@ public class Registry implements ContainerRegistry { Validate.notNull(definition, "Definition must be specified"); try { - logger.log(Level.INFO, "Registering container: {0}", definition.getContainerName()); + logger.log(Level.FINE, "Registering container: {0}", definition.getContainerName()); @SuppressWarnings("rawtypes") Collection containerAdapters = loader.all(DeployableContainer.class); diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/RegistryCreator.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/RegistryCreator.java index bb81a01cbd..f1aa524111 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/RegistryCreator.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/RegistryCreator.java @@ -57,14 +57,13 @@ public class RegistryCreator { @Inject private Instance loader; - - private String authContainer; - private String migrationContainer; - + public void createRegistry(@Observes ArquillianDescriptor event) { ContainerRegistry reg = new Registry(injector.get()); ServiceLoader serviceLoader = loader.get(); + log.info("arquillian.xml: " + System.getProperty("arquillian.xml")); + @SuppressWarnings("rawtypes") Collection containers = serviceLoader.all(DeployableContainer.class); @@ -75,7 +74,7 @@ public class RegistryCreator { for (ContainerDef container : event.getContainers()) { if (isCreatingContainer(container, containers)) { if (isEnabled(container)) { - checkMultipleEnabledContainers(container); + log.info("Registering container: " + container.getContainerName()); reg.create(container, serviceLoader); } else { log.info("Container is disabled: " + container.getContainerName()); @@ -87,7 +86,7 @@ public class RegistryCreator { for (ContainerDef container : group.getGroupContainers()) { if (isCreatingContainer(container, containers)) { if (isEnabled(container)) { - //TODO add checkMultipleEnabledContainers according to groups + log.info("Registering container: " + container.getContainerName()); reg.create(container, serviceLoader); } else { log.info("Container is disabled: " + container.getContainerName()); @@ -106,28 +105,6 @@ public class RegistryCreator { return !props.containsKey(ENABLED) || (props.containsKey(ENABLED) && props.get(ENABLED).equals("true")); } - - private void checkMultipleEnabledContainers(ContainerDef containerDef) { - String containerName = containerDef.getContainerName(); - - if (containerName.startsWith("keycloak")) { - if (migrationContainer == null) { - migrationContainer = containerName; - } else { - throw new RuntimeException("There is more than one migration container " - + "enabled in arquillian.xml. It has to be enabled at most one. " - + "Do not activate more than one migration profile."); - } - } else if (containerName.startsWith("auth-server")) { - if (authContainer == null) { - authContainer = containerName; - } else { - throw new RuntimeException("There is more than one auth containec enabled " - + "in arquillian.xml. It has to be enabled exactly one. Do not " - + "activate more than one auth profile."); - } - } - } @SuppressWarnings("rawtypes") private boolean isCreatingContainer(ContainerDef containerDef, Collection containers) { diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/fragment/DataTable.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/fragment/DataTable.java index 2b1040a808..4a4e19722c 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/fragment/DataTable.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/fragment/DataTable.java @@ -17,6 +17,7 @@ package org.keycloak.testsuite.console.page.fragment; +import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; @@ -89,7 +90,7 @@ public class DataTable { } public void clickRowActionButton(WebElement row, String buttonText) { - row.findElement(xpath(".//td[contains(@class, 'kc-action-cell') and text()='" + buttonText + "']")).click(); + row.findElement(xpath(".//button[text()='" + buttonText + "']")).click(); } } diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/fragment/ModalDialog.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/fragment/ModalDialog.java index 8159d34ef9..df31a4739c 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/fragment/ModalDialog.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/console/page/fragment/ModalDialog.java @@ -18,9 +18,6 @@ package org.keycloak.testsuite.console.page.fragment; import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement; - -import org.jboss.arquillian.graphene.fragment.Root; -import static org.keycloak.testsuite.util.WaitUtils.pause; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; @@ -30,9 +27,6 @@ import org.openqa.selenium.support.FindBy; */ public class ModalDialog { - @Root - private WebElement root; - @FindBy(xpath = ".//button[text()='Cancel']") private WebElement cancelButton; @FindBy(xpath = ".//button[text()='Delete']") @@ -46,20 +40,16 @@ public class ModalDialog { public void ok() { waitUntilElement(okButton).is().present(); okButton.click(); - waitUntilElement(root).is().not().present(); } public void confirmDeletion() { waitUntilElement(deleteButton).is().present(); deleteButton.click(); - waitUntilElement(root).is().not().present(); - pause(100); } public void cancel() { waitUntilElement(cancelButton).is().present(); cancelButton.click(); - waitUntilElement(root).is().not().present(); } public void setName(String name) { @@ -67,4 +57,4 @@ public class ModalDialog { nameInput.clear(); nameInput.sendKeys(name); } -} \ No newline at end of file +} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/Timer.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/Timer.java index 082a2a400b..a23acb6224 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/Timer.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/Timer.java @@ -35,7 +35,6 @@ import org.jfree.chart.plot.PlotOrientation; import org.jfree.data.xy.XYSeries; import org.jfree.data.xy.XYSeriesCollection; import static org.keycloak.testsuite.util.IOUtil.PROJECT_BUILD_DIRECTORY; -import static org.jgroups.util.Util.assertTrue; /** * diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/AbstractKeycloakTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/AbstractKeycloakTest.java index 034bd333ea..a15cdb6687 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/AbstractKeycloakTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/AbstractKeycloakTest.java @@ -276,7 +276,7 @@ public abstract class AbstractKeycloakTest { } private void loadConstantsProperties() throws ConfigurationException { - constantsProperties = new PropertiesConfiguration(System.getProperty("testsuite.constants")); + constantsProperties = new PropertiesConfiguration("test-constants.properties"); constantsProperties.setThrowExceptionOnMissing(true); } diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/META-INF/keycloak-server.json b/testsuite/integration-arquillian/tests/base/src/test/resources/META-INF/keycloak-server.json index 111d5103fc..ae0f5f9a07 100755 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/META-INF/keycloak-server.json +++ b/testsuite/integration-arquillian/tests/base/src/test/resources/META-INF/keycloak-server.json @@ -83,8 +83,7 @@ "password": "${keycloak.connectionsJpa.password:}", "databaseSchema": "${keycloak.connectionsJpa.databaseSchema:update}", "showSql": "${keycloak.connectionsJpa.showSql:false}", - "formatSql": "${keycloak.connectionsJpa.formatSql:true}", - "globalStatsInterval": "${keycloak.connectionsJpa.globalStatsInterval:-1}" + "formatSql": "${keycloak.connectionsJpa.formatSql:true}" } }, diff --git a/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml b/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml index 7c9e96c06e..f1188a1137 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml +++ b/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml @@ -44,52 +44,42 @@ target/deployments - - ${auth.server.undertow} localhost - org.keycloak.testsuite.arquillian.undertow.CustomUndertowContainer + org.keycloak.testsuite.arquillian.undertow.KeycloakOnUndertow ${auth.server.http.port} - + - ${auth.server.wildfly} + ${auth.server.jboss} org.jboss.as.arquillian.container.managed.ManagedDeployableContainer - ${keycloak.home} - -Djboss.socket.binding.port-offset=${auth.server.port.offset} -Djboss.bind.address=0.0.0.0 -Xms64m -Xmx512m -XX:MaxPermSize=256m ${adapter.test.props} + ${auth.server.home} + standalone.xml + + -Djboss.socket.binding.port-offset=${auth.server.port.offset} + -Djboss.bind.address=0.0.0.0 + ${adapter.test.props} + + + ${auth.server.memory.settings} + -Djava.net.preferIPv4Stack=true + ${auth.server.management.port} - ${startup.timeout.sec} + ${auth.server.jboss.startup.timeout} ${auth.server.java.home} - - - + + + - ${auth.server.wildfly.cluster} + ${auth.server.cluster} org.jboss.as.arquillian.container.managed.ManagedDeployableContainer - ${keycloak.balancer.home} - - -Djboss.socket.binding.port-offset=${auth.server.port.offset} - - - -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m - -Djava.net.preferIPv4Stack=true - - ${frontend.console.output} - ${auth.server.management.port} - ${startup.timeout.sec} - - - - - ${auth.server.wildfly.cluster} - org.jboss.as.arquillian.container.managed.ManagedDeployableContainer - ${keycloak.backend1.home} + ${auth.server.backend1.home} standalone-ha.xml -Djboss.socket.binding.port-offset=${auth.server.backend1.port.offset} @@ -97,19 +87,19 @@ ${adapter.test.props} - -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m + ${auth.server.memory.settings} -Djava.net.preferIPv4Stack=true ${backends.console.output} ${auth.server.backend1.management.port} - ${startup.timeout.sec} + ${auth.server.jboss.startup.timeout} - + - ${auth.server.wildfly.cluster} + ${auth.server.cluster} org.jboss.as.arquillian.container.managed.ManagedDeployableContainer - ${keycloak.backend2.home} + ${auth.server.backend2.home} standalone-ha.xml -Djboss.socket.binding.port-offset=${auth.server.backend2.port.offset} @@ -117,93 +107,39 @@ ${adapter.test.props} - -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m + ${auth.server.memory.settings} -Djava.net.preferIPv4Stack=true ${backends.console.output} ${auth.server.backend2.management.port} - ${startup.timeout.sec} + ${auth.server.jboss.startup.timeout} - - + + - ${auth.server.eap7} + ${auth.server.cluster} org.jboss.as.arquillian.container.managed.ManagedDeployableContainer - ${keycloak.home} - -Djboss.socket.binding.port-offset=${auth.server.port.offset} -Djboss.bind.address=0.0.0.0 -Xms64m -Xmx512m -XX:MaxPermSize=256m ${adapter.test.props} - ${startup.timeout.sec} + ${auth.server.balancer.home} + + -Djboss.socket.binding.port-offset=${auth.server.port.offset} + + + -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m + -Djava.net.preferIPv4Stack=true + + ${frontend.console.output} ${auth.server.management.port} - ${auth.server.java.home} + ${auth.server.jboss.startup.timeout} - - - - - ${auth.server.eap7.cluster} - org.jboss.as.arquillian.container.managed.ManagedDeployableContainer - ${keycloak.balancer.home} - - -Djboss.socket.binding.port-offset=${auth.server.port.offset} - - - -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m - -Djava.net.preferIPv4Stack=true - - ${frontend.console.output} - ${auth.server.management.port} - ${startup.timeout.sec} - - - - - ${auth.server.eap7.cluster} - org.jboss.as.arquillian.container.managed.ManagedDeployableContainer - ${keycloak.backend1.home} - standalone-ha.xml - - -Djboss.socket.binding.port-offset=${auth.server.backend1.port.offset} - -Djboss.node.name=node1 - ${adapter.test.props} - - - -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m - -Djava.net.preferIPv4Stack=true - - ${backends.console.output} - ${auth.server.backend1.management.port} - ${startup.timeout.sec} - - - - - ${auth.server.eap7.cluster} - org.jboss.as.arquillian.container.managed.ManagedDeployableContainer - ${keycloak.backend2.home} - standalone-ha.xml - - -Djboss.socket.binding.port-offset=${auth.server.backend2.port.offset} - -Djboss.node.name=node2 - ${adapter.test.props} - - - -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m - -Djava.net.preferIPv4Stack=true - - ${backends.console.output} - ${auth.server.backend2.management.port} - ${startup.timeout.sec} - - - - + - + - ${auth.server.wildfly.kc16} + ${auth.server.jboss.kc16} org.jboss.as.arquillian.container.managed.ManagedDeployableContainer ${keycloak.migration.home} @@ -216,13 +152,13 @@ -Xms64m -Xmx512m -XX:MaxPermSize=256m ${auth.server.management.port} - ${startup.timeout.sec} + ${auth.server.startup.timeout} - + - ${auth.server.wildfly.kc15} + ${auth.server.jboss.kc15} org.jboss.as.arquillian.container.managed.ManagedDeployableContainer ${keycloak.migration.home} @@ -235,49 +171,41 @@ -Xms64m -Xmx512m -XX:MaxPermSize=256m ${auth.server.management.port} - ${startup.timeout.sec} + ${auth.server.startup.timeout} - + - ${auth.server.wildfly.kc14} + ${auth.server.jboss.kc14} org.jboss.as.arquillian.container.managed.ManagedDeployableContainer ${keycloak.migration.home} -Djboss.socket.binding.port-offset=${auth.server.port.offset} -Xms64m -Xmx512m -XX:MaxPermSize=256m ${auth.server.management.port} - ${startup.timeout.sec} + ${auth.server.startup.timeout} - + - ${auth.server.wildfly.kc13} + ${auth.server.jboss.kc13} org.jboss.as.arquillian.container.managed.ManagedDeployableContainer ${keycloak.migration.home} -Djboss.socket.binding.port-offset=${auth.server.port.offset} -Xms64m -Xmx512m -XX:MaxPermSize=256m ${auth.server.management.port} - ${startup.timeout.sec} + ${auth.server.startup.timeout} - + - ${auth.server.wildfly.kc12} + ${auth.server.jboss.kc12} org.jboss.as.arquillian.container.managed.ManagedDeployableContainer ${keycloak.migration.home} -Djboss.socket.binding.port-offset=${auth.server.port.offset} -Xms64m -Xmx512m -XX:MaxPermSize=256m ${auth.server.management.port} - ${startup.timeout.sec} + ${auth.server.startup.timeout} - - - + diff --git a/testsuite/integration-arquillian/tests/other/adapters/as7/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/as7/pom.xml deleted file mode 100644 index eb8ff75d26..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/as7/pom.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-tests-adapters - 2.0.0.CR1-SNAPSHOT - - 4.0.0 - - integration-arquillian-adapters-as7 - Adapter Tests on JBossAS 7 - - - 7.1.1.Final - ${containers.home}/jboss-as-${as7.version} - ${containers.home}/keycloak-as7-adapter-dist - 150 - - - - - org.wildfly - wildfly-arquillian-container-managed - - - org.jboss.as - jboss-as-dist - ${as7.version} - zip - - - org.keycloak - keycloak-as7-adapter-dist - zip - - - org.keycloak - keycloak-saml-as7-adapter-dist - zip - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-as7-and-adapter - generate-resources - - unpack - - - - - org.jboss.as - jboss-as-dist - ${as7.version} - zip - ${containers.home} - - - org.keycloak - keycloak-as7-adapter-dist - ${project.version} - zip - ${adapter.libs.as7} - - - org.keycloak - keycloak-saml-as7-adapter-dist - ${project.version} - zip - ${adapter.libs.as7} - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - ${app.server.as7.home} - ${adapter.libs.as7} - ${startup.timeout.sec} - ${adapter.as7.jdk7.path} - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-properties - - enforce - - - - - adapter.as7.jdk7.path - - - - - - - - - - - - adapter-libs-provided - - - !adapter.libs.bundled - - - - ${app.server.as7.home} - - - - diff --git a/testsuite/integration-arquillian/tests/other/adapters/as7/src/main/xslt/arquillian.xsl b/testsuite/integration-arquillian/tests/other/adapters/as7/src/main/xslt/arquillian.xsl deleted file mode 100644 index d3ec99c9d3..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/as7/src/main/xslt/arquillian.xsl +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - ${app.server.as7} - org.jboss.as.arquillian.container.managed.ManagedDeployableContainer - ${app.server.as7.home} - -Djboss.socket.binding.port-offset=${app.server.port.offset} -Xms64m -Xmx512m -XX:MaxPermSize=256m ${adapter.test.props} - localhost - remote - ${app.server.management.port.jmx} - ${startup.timeout.sec} - ${adapter.as7.jdk7.path} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/as7/src/test/java/org/keycloak/testsuite/adapter/servlet/AS7DemoServletsAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/as7/src/test/java/org/keycloak/testsuite/adapter/servlet/AS7DemoServletsAdapterTest.java deleted file mode 100644 index 1a4a68c30c..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/as7/src/test/java/org/keycloak/testsuite/adapter/servlet/AS7DemoServletsAdapterTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-as7") -@AdapterLibsLocationProperty("adapter.libs.as7") -public class AS7DemoServletsAdapterTest extends AbstractDemoServletsAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/as7/src/test/java/org/keycloak/testsuite/adapter/servlet/AS7SessionServletAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/as7/src/test/java/org/keycloak/testsuite/adapter/servlet/AS7SessionServletAdapterTest.java deleted file mode 100644 index 4b88033f35..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/as7/src/test/java/org/keycloak/testsuite/adapter/servlet/AS7SessionServletAdapterTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-as7") -@AdapterLibsLocationProperty("adapter.libs.as7") -public class AS7SessionServletAdapterTest extends AbstractSessionServletAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/eap6/pom.xml deleted file mode 100644 index 4a7a4a1ce6..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap6/pom.xml +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-tests-adapters - 2.0.0.CR1-SNAPSHOT - - 4.0.0 - - integration-arquillian-adapters-eap6 - Adapter Tests on EAP 6 - - - ${containers.home}/jboss-eap-6.4 - ${containers.home}/keycloak-eap6-adapter-dist - ${project.version} - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - ${app.server.eap6.home} - ${adapter.libs.eap6} - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-eap6-with-adapters - generate-resources - - unpack - - - - - org.jboss.as - jboss-as-dist - ${jboss.as.version} - zip - ${containers.home} - - - org.keycloak - keycloak-eap6-adapter-dist - ${version.adapter.dist} - zip - ${adapter.libs.eap6} - - - org.keycloak - keycloak-saml-eap6-adapter-dist - ${version.adapter.dist} - zip - ${adapter.libs.eap6} - - - - - - - - org.codehaus.mojo - xml-maven-plugin - - - configure-adapter-debug-log - process-resources - - transform - - - - - ${app.server.eap6.home}/standalone/configuration - - standalone.xml - - src/main/xslt/add-adapter-log-level.xsl - ${app.server.eap6.home}/standalone/configuration - - - - - - - - - - - - - adapter-jdk - - - adapter.jdk - - - - - - org.codehaus.mojo - xml-maven-plugin - - - add-java-home-to-arquillian-xml - process-resources - - transform - - - - - ${project.build.directory}/dependency - - arquillian.xml - - src/main/xslt/arquillian_jdk.xsl - - - javaHome - ${adapter.jdk} - - - ${project.build.directory}/dependency - - - - - - - - - - - adapter-libs-provided - - - !adapter.libs.bundled - - - - ${app.server.eap6.home} - - - - ssl - - - app.server.ssl.required - - - - - - org.codehaus.mojo - xml-maven-plugin - - - configure-adapter-subsystem-security - process-resources - - transform - - - - - ${app.server.eap6.home}/standalone/configuration - - standalone.xml - - src/main/xslt/security.xsl - ${app.server.eap6.home}/standalone/configuration - - - - - - - - maven-resources-plugin - - - copy-keystore - process-resources - - copy-resources - - - ${app.server.eap6.home}/standalone/configuration - - - src/main/keystore - - adapter.jks - keycloak.truststore - - - - - jks - truststore - - - - - - - - - - diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/keystore/keycloak.truststore b/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/keystore/keycloak.truststore deleted file mode 100644 index 2df5170f9b39756055850ed3ad0c5d012aab1402..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1857 zcmezO_TO6u1_mZL=E})WPRz;3FD@}+U|MkMHlk@H8W4_LHnT8m&Fogw@|!Tij3-^a(24 zxS>4i;cs@HcH8_*%IE9ah3cCew{CaLFt^eX*I#(vlzYZ~#}B!TZPKMP5B0A8S79P0 zYrOhInU0UA*R##KSyv|aPRzPi@8jH1Uc5u^_%-Vft$&(iLtlN&IB=xKB_y`(W9Xub zjGBj^E2i(#=aHJeBk-#5xywcFGn5P%)o!M~s`~vzYUaoMPeFBpU#))>D;(~exz3P7 z`!C0{`zzP|OMe-((NeALrS`Pzb5_OQ;w?6M@lyQC4vmk}a;7`C&tJLjq4O2qKW)*6 zXIc6@7B!2FXJTe#U|g(dAa5WGj6zvH7BLo)FUuHABUY@FT*999?~z={<7W-mB#;9U zn2Lab$jIPcmbaJLw7lu;(A@;P(=-?N{B zKh9n4n;4ug%(47H=^2ZE5@`%Kr7Wt?-mUZsaa|W)@V{)5&FSsS?_61}5o=ZUd^2X`h;i+|kZX3@n30%2Qu2X-{lW8kT_B{!n9GZAOX>+hL=hl7g zDXVmLAKB3K;ppUbS1sMywK?bW9P->E=+Mn+W_rEiZxxfmPmdq-T#S4^_D<7TQ2%`X z-5<-(y5CxRHkF0(@XvX7`u0>Tyq)j#-ey61qG0t;sV4QsZ679V@zhM+@a0IPgiNf@ z%s`2`3)ee_Zn^Sd!|4a^%i{RD**_cm>S=QCW@ebaYaa9yiMmTDBE3bSUY(6+|nM{e3Hea`KDZEj@x%^88TqL zVC6JT>!{9&ySHc`T$iG>%jz^*Is#`%=Kf!Hn<}3Cn=@Brd%6D#?RWk&BP6yoGWA)` z-)MbHGcSy1OP;h_-iK93KD9nIsx%SiogA(ZTv5j`XHS(&_uDgHi~cmLOx^VE`k8yS zf%aXot3N1eMn`LXN-_L#WB(ZwjbrHtnjdr<*|2SB+OW;`Jg@wLdr!O8NYyqg-kbPZ z;;7Ke8Cw{|W8YpYnjiciZ&Re|xy@b&T&^E^UMIM(e7Cf0P4lP67X;OPnl9-xZO6Ih7^bG<^O+sfvUc1({JQodpT)7J%o~$D z`DSmJD^)tb$MaEXf5Tp{t?I@Xh3@f(^ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/arquillian.xsl b/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/arquillian.xsl deleted file mode 100644 index c6905d6581..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/arquillian.xsl +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - ${app.server.eap6} - org.jboss.as.arquillian.container.managed.ManagedDeployableContainer - ${app.server.eap6.home} - -Djboss.socket.binding.port-offset=${app.server.port.offset} -Xms64m -Xmx512m -XX:MaxPermSize=256m ${adapter.test.props} - localhost - remote - ${app.server.management.port.jmx} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/arquillian_jdk.xsl b/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/arquillian_jdk.xsl deleted file mode 100644 index 7d069661e7..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/arquillian_jdk.xsl +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/security.xsl b/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/security.xsl deleted file mode 100644 index 0cc688a866..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/main/xslt/security.xsl +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP6DemoServletsAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP6DemoServletsAdapterTest.java deleted file mode 100644 index ec10d19b58..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP6DemoServletsAdapterTest.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; -import org.junit.Ignore; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-eap6") -@AdapterLibsLocationProperty("adapter.libs.eap6") -@Ignore //failing tests -public class EAP6DemoServletsAdapterTest extends AbstractDemoServletsAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP6SAMLServletsAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP6SAMLServletsAdapterTest.java deleted file mode 100644 index 0622352fd1..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP6SAMLServletsAdapterTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * @author mhajas - */ -@AppServerContainer("app-server-eap6") -@AdapterLibsLocationProperty("adapter.libs.eap6") -public class EAP6SAMLServletsAdapterTest extends AbstractSAMLServletsAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP6SessionServletAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP6SessionServletAdapterTest.java deleted file mode 100644 index c187910a0e..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP6SessionServletAdapterTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-eap6") -@AdapterLibsLocationProperty("adapter.libs.eap6") -public class EAP6SessionServletAdapterTest extends AbstractSessionServletAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/eap7/pom.xml deleted file mode 100644 index 3f04a57b44..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap7/pom.xml +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-tests-adapters - 2.0.0.CR1-SNAPSHOT - - 4.0.0 - - integration-arquillian-adapters-eap7 - Adapter Tests on EAP 7 - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - - - - - app-server-eap7 - - ${containers.home}/jboss-eap-7.0 - ${containers.home}/keycloak-eap7-adapter-dist - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-properties - - enforce - - - - - version.eap7.dist - - - version.adapter.dist - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-eap7-with-adapters - generate-resources - - unpack - - - - - org.jboss.eap - wildfly-dist - ${version.eap7.dist} - zip - ${containers.home} - - - org.keycloak - keycloak-wildfly-adapter-dist - ${version.adapter.dist} - zip - ${adapter.libs.eap7} - - - org.keycloak - keycloak-saml-wildfly-adapter-dist - ${version.adapter.dist} - zip - ${adapter.libs.eap7} - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - true - ${app.server.eap7.home} - ${adapter.libs.eap7} - - - - - - org.codehaus.mojo - xml-maven-plugin - - - configure-adapter-debug-log - process-resources - - transform - - - - - ${app.server.eap7.home}/standalone/configuration - - standalone.xml - - src/main/xslt/add-adapter-log-level.xsl - ${app.server.eap7.home}/standalone/configuration - - - - - - - - - - - - adapter-jdk - - - adapter.jdk - - - - - - org.codehaus.mojo - xml-maven-plugin - - - add-java-home-to-arquillian-xml - process-resources - - transform - - - - - ${project.build.directory}/dependency - - arquillian.xml - - src/main/xslt/arquillian_jdk.xsl - - - javaHome - ${adapter.jdk} - - - ${project.build.directory}/dependency - - - - - - - - - - - ssl - - - app.server.ssl.required - - - - - - org.codehaus.mojo - xml-maven-plugin - - - configure-adapter-subsystem-security - process-resources - - transform - - - - - ${app.server.eap7.home}/standalone/configuration - - standalone.xml - - src/main/xslt/security.xsl - ${app.server.eap7.home}/standalone/configuration - - - - - - - - maven-resources-plugin - 2.7 - - - copy-keystore - process-resources - - copy-resources - - - ${app.server.eap7.home}/standalone/configuration - - - src/main/keystore - - adapter.jks - keycloak.truststore - - - - - jks - truststore - - - - - - - - - - adapter-libs-provided - - - !adapter.libs.bundled - - - - ${app.server.eap7.home} - - - - diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/keystore/adapter.jks b/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/keystore/adapter.jks deleted file mode 100644 index 57cc34b6c4c0eaf60347dd8f894d5e81ffbb173d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmcgt={wX58=l|HU<{+iDB_G7YOxn&de8Nqzu^6Ff4J}G`S4u#^IZ3{Gruzrfk2>p0R9I5RmK&^ ztL_Xx|2@URlVxfTf$#tX5WYc7)sK zAidVkE`C^;kB@+T=}_8UJx}8E`+jtZlgB2kuWzwAep5(5L z605_}2^HYZO3u7zoq}wUA&-v+Lic*Y+gl6)YGY@9B_#4uUP7sW!1~tH#WR4mM*`leF4rbv@KAX0~NZg);l71+&Q-%mcz;p?%}!c{AkopNE0r8STMa@ z(TrOMlA!EQ^tW>vHOW1U|~^`z0@m!5%=f@Ys=u%la2yXWSydz(%2oeJTT*Q?`=FAJTN z@o|blPuayu>C&X0`c$)fJHC5&v>07#6GIBGrfIn}3R|BAIbIYhM#wM(o}<1jtv^9% z&Z#h4zS-aD%%|c{J2>k$(Qws)d_y&7^QBWa7j7EXp4?_}Taq5YO{tF?&p1HEFjczn zz{KnN2Pm(f&Zag3Fqd7ePju9(+5O>QxNwKC$e?VpQ*c*LTw0lA`sf&g+0}n09`OXM z9hbnDY|8OgwYn62^t@CXv?)RA8{Ja)maU}xrYYz^?T2{zNPp}8`qPcgOK>_$<}7uo zd_l?85?<ML|JX>?p$t~=FRF_l*UdM{xZ*DZOubHFv0nv_lT3=ZHygG1j2uq&**cN+ zP~oXt5UkBN9gIbB7TnMEnP?S3^VK9JwG{tmYC|C6o7ka8+Gf55tVya)$Ei`Bk(zN6 zEloNOb`bn?okY1er#IQf^h$Z1@3=Z~f! zM9*C@%s)4+qwD)#a0Yw-ebtdHxLHMrnr@%aPDF%aQQ=5X;#{#9FP~BpKCv;+$@9S1 zm{29r3;Oz|UK(%iekLT`09b^fK#*?)_o9(Q)oG-0wtlanMVEGHJ4QuKs&w^*(8K$t z+0iQ+`8VPWC~*u9{)MJqcwvwfqs{$dnykg6@GwtZ&6n7)uER6N!hdHY&jlqCK?4GT zc@aR^Zv+r(kq3hUP$*p4d|{Y?;^mi%HH=+H0e}Dxgy2FHAn^0Ttl_*Es5R{$g1|t{ zC`2@2-(M9z4C1_tpT8@^*O|C~FJAW~B!Pd``m7)(jN>oF8*svi~PSEJNAq_q^Y1!Apdm)#qhuAR2Bi(R%Z=mTU~UvO@< z%7WtQH5TtM-2=V`8BzoQKkPCa`g2O0xy)Fxj6knx{qQ@&N?=wH5%SxJ>9Nv^9k&_F zN)3GMjC|T3*=6?cQGP04XG8~UWR@i)NiVB&ODiVy2T@zGmspt^rjrNAcJ@#h009bd zgu?{v-U_io@PlxX)nW+g!lQ~qMSLDRpCqj&r=y0%{%zvk744Y_Knw!ubudy8*p=cO zQ`4@i;Amget}+&_yXMPcav3|#z#oHC8!J13zmB^;)UdWj(AxamE5+j8J+8PChteEg zNtL=1;EYF)W@-A18#7DoT8icr%7^Q0=+7*HEE@p>u#<=m~ zfeG(F$Y$!SniH2PW|Yo$h?GH<@P;E&@v-l4%0!b~s2)04=w+dY Jt?$>je*%%w*Z}|l diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/keystore/keycloak.truststore b/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/keystore/keycloak.truststore deleted file mode 100644 index 2df5170f9b39756055850ed3ad0c5d012aab1402..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1857 zcmezO_TO6u1_mZL=E})WPRz;3FD@}+U|MkMHlk@H8W4_LHnT8m&Fogw@|!Tij3-^a(24 zxS>4i;cs@HcH8_*%IE9ah3cCew{CaLFt^eX*I#(vlzYZ~#}B!TZPKMP5B0A8S79P0 zYrOhInU0UA*R##KSyv|aPRzPi@8jH1Uc5u^_%-Vft$&(iLtlN&IB=xKB_y`(W9Xub zjGBj^E2i(#=aHJeBk-#5xywcFGn5P%)o!M~s`~vzYUaoMPeFBpU#))>D;(~exz3P7 z`!C0{`zzP|OMe-((NeALrS`Pzb5_OQ;w?6M@lyQC4vmk}a;7`C&tJLjq4O2qKW)*6 zXIc6@7B!2FXJTe#U|g(dAa5WGj6zvH7BLo)FUuHABUY@FT*999?~z={<7W-mB#;9U zn2Lab$jIPcmbaJLw7lu;(A@;P(=-?N{B zKh9n4n;4ug%(47H=^2ZE5@`%Kr7Wt?-mUZsaa|W)@V{)5&FSsS?_61}5o=ZUd^2X`h;i+|kZX3@n30%2Qu2X-{lW8kT_B{!n9GZAOX>+hL=hl7g zDXVmLAKB3K;ppUbS1sMywK?bW9P->E=+Mn+W_rEiZxxfmPmdq-T#S4^_D<7TQ2%`X z-5<-(y5CxRHkF0(@XvX7`u0>Tyq)j#-ey61qG0t;sV4QsZ679V@zhM+@a0IPgiNf@ z%s`2`3)ee_Zn^Sd!|4a^%i{RD**_cm>S=QCW@ebaYaa9yiMmTDBE3bSUY(6+|nM{e3Hea`KDZEj@x%^88TqL zVC6JT>!{9&ySHc`T$iG>%jz^*Is#`%=Kf!Hn<}3Cn=@Brd%6D#?RWk&BP6yoGWA)` z-)MbHGcSy1OP;h_-iK93KD9nIsx%SiogA(ZTv5j`XHS(&_uDgHi~cmLOx^VE`k8yS zf%aXot3N1eMn`LXN-_L#WB(ZwjbrHtnjdr<*|2SB+OW;`Jg@wLdr!O8NYyqg-kbPZ z;;7Ke8Cw{|W8YpYnjiciZ&Re|xy@b&T&^E^UMIM(e7Cf0P4lP67X;OPnl9-xZO6Ih7^bG<^O+sfvUc1({JQodpT)7J%o~$D z`DSmJD^)tb$MaEXf5Tp{t?I@Xh3@f(^ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/arquillian.xsl b/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/arquillian.xsl deleted file mode 100644 index 927edf5ea9..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/arquillian.xsl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - ${app.server.eap7} - org.jboss.as.arquillian.container.managed.ManagedDeployableContainer - ${app.server.eap7.home} - -Djboss.socket.binding.port-offset=${app.server.port.offset} -Xms64m -Xmx512m -XX:MaxPermSize=256m ${adapter.test.props} - ${app.server.management.port} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/arquillian_jdk.xsl b/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/arquillian_jdk.xsl deleted file mode 100644 index 1be15ed4ff..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/main/xslt/arquillian_jdk.xsl +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7BasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7BasicAuthExampleAdapterTest.java deleted file mode 100644 index 99788f2297..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7BasicAuthExampleAdapterTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-eap7") -@AdapterLibsLocationProperty("adapter.libs.eap7") -public class EAP7BasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7CorsExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7CorsExampleAdapterTest.java deleted file mode 100644 index 9ec6ec9a14..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7CorsExampleAdapterTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; -import org.junit.Ignore; - -/** - * @author fkiss - */ -@AppServerContainer("app-server-eap7") -@AdapterLibsLocationProperty("adapter.libs.eap7") -@Ignore //cannot find web.xml in target/examples -public class EAP7CorsExampleAdapterTest extends AbstractCorsExampleAdapterTest { - -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7DemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7DemoExampleAdapterTest.java deleted file mode 100644 index ae90768604..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7DemoExampleAdapterTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; -import org.junit.Ignore; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-eap7") -@AdapterLibsLocationProperty("adapter.libs.eap7") -public class EAP7DemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { - -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7JSConsoleExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7JSConsoleExampleAdapterTest.java deleted file mode 100644 index ca6276caaf..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7JSConsoleExampleAdapterTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; -import org.junit.Ignore; -/** - * @author tkyjovsk - */ -@AppServerContainer("app-server-eap7") -@AdapterLibsLocationProperty("adapter.libs.eap7") -@Ignore //jsconsole example has hardcoded relative path to keycloak.js -public class EAP7JSConsoleExampleAdapterTest extends AbstractJSConsoleExampleAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7SAMLExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7SAMLExampleAdapterTest.java deleted file mode 100644 index 9ab9b978d8..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/example/EAP7SAMLExampleAdapterTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; -import org.junit.Ignore; - -/** - * @author mhajas - */ -@AppServerContainer("app-server-eap7") -@AdapterLibsLocationProperty("adapter.libs.eap7") -public class EAP7SAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { - -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP7DemoServletsAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP7DemoServletsAdapterTest.java deleted file mode 100644 index eab9842448..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP7DemoServletsAdapterTest.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; -import org.junit.Ignore; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-eap7") -@AdapterLibsLocationProperty("adapter.libs.eap7") -@Ignore //failing tests -public class EAP7DemoServletsAdapterTest extends AbstractDemoServletsAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP7SAMLServletsAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP7SAMLServletsAdapterTest.java deleted file mode 100644 index d4b460f695..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP7SAMLServletsAdapterTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * @author mhajas - */ -@AppServerContainer("app-server-eap7") -@AdapterLibsLocationProperty("adapter.libs.eap7") -public class EAP7SAMLServletsAdapterTest extends AbstractSAMLServletsAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP7SessionServletAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP7SessionServletAdapterTest.java deleted file mode 100644 index e59432eb7e..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/eap7/src/test/java/org/keycloak/testsuite/adapter/servlet/EAP7SessionServletAdapterTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-eap7") -@AdapterLibsLocationProperty("adapter.libs.eap7") -public class EAP7SessionServletAdapterTest extends AbstractSessionServletAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/pom.xml new file mode 100644 index 0000000000..e3a882d968 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/pom.xml @@ -0,0 +1,67 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-jboss + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-as7 + + Adapter Tests - JBoss - JBossAS 7 + + + as7 + ${app.server.home}/modules/org/keycloak + + remote + ${app.server.management.port.jmx} + + ${java7.home} + -Xms64m -Xmx512m -XX:MaxPermSize=256m + + + + + + maven-enforcer-plugin + + + + enforce + + + + + java7.home + + + + + + + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/AS7OIDCAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/AS7OIDCAdapterTest.java new file mode 100644 index 0000000000..93dec26649 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/AS7OIDCAdapterTest.java @@ -0,0 +1,14 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractDemoServletsAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-as7") +//@AdapterLibsLocationProperty("adapter.libs.as7") +public class AS7OIDCAdapterTest extends AbstractDemoServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/AS7OIDCSessionAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/AS7OIDCSessionAdapterTest.java new file mode 100644 index 0000000000..51da714e5d --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/AS7OIDCSessionAdapterTest.java @@ -0,0 +1,14 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSessionServletAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-as7") +//@AdapterLibsLocationProperty("adapter.libs.as7") +public class AS7OIDCSessionAdapterTest extends AbstractSessionServletAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/example/AS7BasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/example/AS7BasicAuthExampleAdapterTest.java new file mode 100644 index 0000000000..7c62445161 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/example/AS7BasicAuthExampleAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-as7") +//@AdapterLibsLocationProperty("adapter.libs.as7") +public class AS7BasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/example/AS7DemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/example/AS7DemoExampleAdapterTest.java new file mode 100644 index 0000000000..53ae0e18b2 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/as7/src/test/java/org/keycloak/testsuite/adapter/example/AS7DemoExampleAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-as7") +//@AdapterLibsLocationProperty("adapter.libs.as7") +public class AS7DemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { + +} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/common/xslt/arquillian.xsl b/testsuite/integration-arquillian/tests/other/adapters/jboss/common/xslt/arquillian.xsl new file mode 100644 index 0000000000..74541a0193 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/common/xslt/arquillian.xsl @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + true + org.jboss.as.arquillian.container.managed.ManagedDeployableContainer + ${app.server.home} + ${app.server.java.home} + + -Djboss.socket.binding.port-offset=${app.server.port.offset} + ${adapter.test.props} + + + ${app.server.memory.settings} + -Djava.net.preferIPv4Stack=true + + ${app.server.management.protocol} + ${app.server.management.port} + ${app.server.startup.timeout} + + + + + + + + + + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/pom.xml new file mode 100644 index 0000000000..ad22c37d59 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/pom.xml @@ -0,0 +1,38 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-jboss + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-eap + + Adapter Tests - JBoss - EAP + + + eap + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/EAPOIDCAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/EAPOIDCAdapterTest.java new file mode 100644 index 0000000000..4912f06fd9 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/EAPOIDCAdapterTest.java @@ -0,0 +1,16 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; +import org.junit.Ignore; +import org.keycloak.testsuite.adapter.servlet.AbstractDemoServletsAdapterTest; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-eap") +//@AdapterLibsLocationProperty("adapter.libs.eap7") +//@Ignore //failing tests +public class EAPOIDCAdapterTest extends AbstractDemoServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/EAPOIDCSessionAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/EAPOIDCSessionAdapterTest.java new file mode 100644 index 0000000000..e1db84faeb --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/EAPOIDCSessionAdapterTest.java @@ -0,0 +1,14 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSessionServletAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-eap") +//@AdapterLibsLocationProperty("adapter.libs.eap7") +public class EAPOIDCSessionAdapterTest extends AbstractSessionServletAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/EAPSAMLAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/EAPSAMLAdapterTest.java new file mode 100644 index 0000000000..8852087121 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/EAPSAMLAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSAMLServletsAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * @author mhajas + */ +@AppServerContainer("app-server-eap") +//@AdapterLibsLocationProperty("adapter.libs.eap7") +public class EAPSAMLAdapterTest extends AbstractSAMLServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPBasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPBasicAuthExampleAdapterTest.java new file mode 100644 index 0000000000..26b7c5f98e --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPBasicAuthExampleAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-eap") +//@AdapterLibsLocationProperty("adapter.libs.eap7") +public class EAPBasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPDemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPDemoExampleAdapterTest.java new file mode 100644 index 0000000000..fa22b56d1d --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPDemoExampleAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-eap") +//@AdapterLibsLocationProperty("adapter.libs.eap7") +public class EAPDemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { + +} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPSAMLExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPSAMLExampleAdapterTest.java new file mode 100644 index 0000000000..4ae083889d --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPSAMLExampleAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * @author mhajas + */ +@AppServerContainer("app-server-eap") +//@AdapterLibsLocationProperty("adapter.libs.eap7") +public class EAPSAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { + +} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/pom.xml new file mode 100644 index 0000000000..09be582adf --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/pom.xml @@ -0,0 +1,41 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-jboss + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-eap6 + + Adapter Tests - JBoss - EAP 6 + + + eap6 + + remote + ${app.server.management.port.jmx} + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/EAP6OIDCAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/EAP6OIDCAdapterTest.java new file mode 100644 index 0000000000..356237093b --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/EAP6OIDCAdapterTest.java @@ -0,0 +1,16 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; +import org.junit.Ignore; +import org.keycloak.testsuite.adapter.servlet.AbstractDemoServletsAdapterTest; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-eap6") +//@AdapterLibsLocationProperty("adapter.libs.eap6") +//@Ignore //failing tests +public class EAP6OIDCAdapterTest extends AbstractDemoServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/EAP6OIDCSessionAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/EAP6OIDCSessionAdapterTest.java new file mode 100644 index 0000000000..82f5926b45 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/EAP6OIDCSessionAdapterTest.java @@ -0,0 +1,14 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSessionServletAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-eap6") +//@AdapterLibsLocationProperty("adapter.libs.eap6") +public class EAP6OIDCSessionAdapterTest extends AbstractSessionServletAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/EAP6SAMLAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/EAP6SAMLAdapterTest.java new file mode 100644 index 0000000000..dff9bc1cb8 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/EAP6SAMLAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSAMLServletsAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * @author mhajas + */ +@AppServerContainer("app-server-eap6") +//@AdapterLibsLocationProperty("adapter.libs.eap6") +public class EAP6SAMLAdapterTest extends AbstractSAMLServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6BasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6BasicAuthExampleAdapterTest.java similarity index 68% rename from testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6BasicAuthExampleAdapterTest.java rename to testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6BasicAuthExampleAdapterTest.java index 118f4e46da..c293d051d5 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6BasicAuthExampleAdapterTest.java +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6BasicAuthExampleAdapterTest.java @@ -1,6 +1,5 @@ package org.keycloak.testsuite.adapter.example; -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; /** @@ -8,7 +7,7 @@ import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; * @author tkyjovsk */ @AppServerContainer("app-server-eap6") -@AdapterLibsLocationProperty("adapter.libs.eap6") +//@AdapterLibsLocationProperty("adapter.libs.eap6") public class EAP6BasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { } diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6CorsExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6CorsExampleAdapterTest.java similarity index 72% rename from testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6CorsExampleAdapterTest.java rename to testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6CorsExampleAdapterTest.java index aed0de4ddd..8bc4646509 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6CorsExampleAdapterTest.java +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6CorsExampleAdapterTest.java @@ -1,6 +1,5 @@ package org.keycloak.testsuite.adapter.example; -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; import org.junit.Ignore; @@ -8,7 +7,7 @@ import org.junit.Ignore; * @author fkiss */ @AppServerContainer("app-server-eap6") -@AdapterLibsLocationProperty("adapter.libs.eap6") +//@AdapterLibsLocationProperty("adapter.libs.eap6") @Ignore //cannot find web.xml in target/examples public class EAP6CorsExampleAdapterTest extends AbstractCorsExampleAdapterTest { diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6DemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6DemoExampleAdapterTest.java similarity index 63% rename from testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6DemoExampleAdapterTest.java rename to testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6DemoExampleAdapterTest.java index 875b5bf0ec..9541c143c8 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6DemoExampleAdapterTest.java +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6DemoExampleAdapterTest.java @@ -1,15 +1,13 @@ package org.keycloak.testsuite.adapter.example; -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; -import org.junit.Ignore; /** * * @author tkyjovsk */ @AppServerContainer("app-server-eap6") -@AdapterLibsLocationProperty("adapter.libs.eap6") +//@AdapterLibsLocationProperty("adapter.libs.eap6") public class EAP6DemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { } \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6JSConsoleExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6JSConsoleExampleAdapterTest.java similarity index 74% rename from testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6JSConsoleExampleAdapterTest.java rename to testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6JSConsoleExampleAdapterTest.java index 4fc0391a25..20bd52eb57 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6JSConsoleExampleAdapterTest.java +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6JSConsoleExampleAdapterTest.java @@ -1,13 +1,12 @@ package org.keycloak.testsuite.adapter.example; -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; import org.junit.Ignore; /** * @author tkyjovsk */ @AppServerContainer("app-server-eap6") -@AdapterLibsLocationProperty("adapter.libs.eap6") +//@AdapterLibsLocationProperty("adapter.libs.eap6") @Ignore //jsconsole example has hardcoded relative path to keycloak.js public class EAP6JSConsoleExampleAdapterTest extends AbstractJSConsoleExampleAdapterTest { diff --git a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6SAMLExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6SAMLExampleAdapterTest.java similarity index 63% rename from testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6SAMLExampleAdapterTest.java rename to testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6SAMLExampleAdapterTest.java index 7eaa5cccd1..f0977dcf25 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6SAMLExampleAdapterTest.java +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6SAMLExampleAdapterTest.java @@ -1,14 +1,12 @@ package org.keycloak.testsuite.adapter.example; -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; -import org.junit.Ignore; /** * @author mhajas */ @AppServerContainer("app-server-eap6") -@AdapterLibsLocationProperty("adapter.libs.eap6") +//@AdapterLibsLocationProperty("adapter.libs.eap6") public class EAP6SAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { } \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/jboss/pom.xml new file mode 100644 index 0000000000..f06e57873b --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/pom.xml @@ -0,0 +1,102 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-jboss + + pom + + Adapter Tests - JBoss + + + ${project.parent.basedir}/common + ${app.server.home}/modules/system/add-ons/keycloak + + + + + adapter-test-jboss-submodules + + + src + + + + + org.wildfly + wildfly-arquillian-container-managed + + + + + + app-server-as7 + + as7 + + + + app-server-eap + + eap + + + + app-server-eap6 + + eap6 + + + + app-server-wildfly + + wildfly + + + + app-server-wildfly8 + + wildfly8 + + + + app-server-wildfly9 + + wildfly9 + + + + app-server-relative + + relative + + + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/pom.xml new file mode 100644 index 0000000000..10c3ef4a8d --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/pom.xml @@ -0,0 +1,66 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-jboss-relative + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-relative-eap + + Adapter Tests - JBoss - Relative EAP + + + relative-eap + + + + + + maven-enforcer-plugin + + + + enforce + + + + + auth-server-eap + + + + + + + + + + + + auth-server-eap + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/RelativeEAPOIDCAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/RelativeEAPOIDCAdapterTest.java new file mode 100644 index 0000000000..249ec6bdf4 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/RelativeEAPOIDCAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractDemoServletsAdapterTest; + +/** + * + * @author tkyjovsk + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeEAPOIDCAdapterTest extends AbstractDemoServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/RelativeEAPOIDCSessionAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/RelativeEAPOIDCSessionAdapterTest.java new file mode 100644 index 0000000000..9ef19ce823 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/RelativeEAPOIDCSessionAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSessionServletAdapterTest; + +/** + * + * @author tkyjovsk + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeEAPOIDCSessionAdapterTest extends AbstractSessionServletAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/RelativeEAPSAMLAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/RelativeEAPSAMLAdapterTest.java new file mode 100644 index 0000000000..cd27bee6be --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/RelativeEAPSAMLAdapterTest.java @@ -0,0 +1,11 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSAMLServletsAdapterTest; + +/** + * @author mhajas + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeEAPSAMLAdapterTest extends AbstractSAMLServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPBasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPBasicAuthExampleAdapterTest.java new file mode 100644 index 0000000000..60b9595907 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPBasicAuthExampleAdapterTest.java @@ -0,0 +1,10 @@ +package org.keycloak.testsuite.adapter.example; + +/** + * + * @author tkyjovsk + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeEAPBasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPCorsExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPCorsExampleAdapterTest.java new file mode 100644 index 0000000000..a718a3bf7b --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPCorsExampleAdapterTest.java @@ -0,0 +1,10 @@ +package org.keycloak.testsuite.adapter.example; + +/** + * + * @author fkiss + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeEAPCorsExampleAdapterTest extends AbstractCorsExampleAdapterTest { + +} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPDemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPDemoExampleAdapterTest.java new file mode 100644 index 0000000000..d2775bfdc8 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPDemoExampleAdapterTest.java @@ -0,0 +1,10 @@ +package org.keycloak.testsuite.adapter.example; + +/** + * + * @author tkyjovsk + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeEAPDemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPJSConsoleExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPJSConsoleExampleAdapterTest.java new file mode 100644 index 0000000000..d11f68bc18 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPJSConsoleExampleAdapterTest.java @@ -0,0 +1,10 @@ +package org.keycloak.testsuite.adapter.example; + +/** + * + * @author tkyjovsk + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeEAPJSConsoleExampleAdapterTest extends AbstractJSConsoleExampleAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPSAMLExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPSAMLExampleAdapterTest.java new file mode 100644 index 0000000000..6361e83ca4 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPSAMLExampleAdapterTest.java @@ -0,0 +1,10 @@ +package org.keycloak.testsuite.adapter.example; + +/** + * + * @author mhajas + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeEAPSAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { + +} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/pom.xml new file mode 100644 index 0000000000..30fbf6c1e5 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/pom.xml @@ -0,0 +1,72 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-jboss + 2.0.0.CR1-SNAPSHOT + + + pom + + integration-arquillian-tests-adapters-jboss-relative + + Adapter Tests - JBoss - Relative + + + ${project.parent.parent.basedir}/common + + true + + false + app-server-${app.server} + ${app.server.artifactId} + + suite + + ${auth.server.port.offset} + ${auth.server.http.port} + ${auth.server.https.port} + ${auth.server.management.port} + + ${auth.server.jboss.startup.timeout} + ${auth.server.memory.settings} + ${auth.server.ssl.required} + + + + + auth-server-wildfly + + wildfly + + + + auth-server-eap + + eap + + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/pom.xml new file mode 100644 index 0000000000..cfa7507e74 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/pom.xml @@ -0,0 +1,66 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-jboss-relative + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-relative-wildfly + + Adapter Tests - JBoss - Relative Wildfly + + + relative-wildfly + + + + + + maven-enforcer-plugin + + + + enforce + + + + + auth-server-wildfly + + + + + + + + + + + + auth-server-wildfly + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/RelativeWildflyOIDCAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/RelativeWildflyOIDCAdapterTest.java new file mode 100644 index 0000000000..dd7b73321c --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/RelativeWildflyOIDCAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractDemoServletsAdapterTest; + +/** + * + * @author tkyjovsk + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeWildflyOIDCAdapterTest extends AbstractDemoServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/RelativeWildflyOIDCSessionAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/RelativeWildflyOIDCSessionAdapterTest.java new file mode 100644 index 0000000000..021d25b874 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/RelativeWildflyOIDCSessionAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSessionServletAdapterTest; + +/** + * + * @author tkyjovsk + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeWildflyOIDCSessionAdapterTest extends AbstractSessionServletAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/RelativeWildflySAMLAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/RelativeWildflySAMLAdapterTest.java new file mode 100644 index 0000000000..0413cee7d4 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/RelativeWildflySAMLAdapterTest.java @@ -0,0 +1,11 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSAMLServletsAdapterTest; + +/** + * @author mhajas + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeWildflySAMLAdapterTest extends AbstractSAMLServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyBasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyBasicAuthExampleAdapterTest.java new file mode 100644 index 0000000000..dc2f293d10 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyBasicAuthExampleAdapterTest.java @@ -0,0 +1,10 @@ +package org.keycloak.testsuite.adapter.example; + +/** + * + * @author tkyjovsk + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeWildflyBasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyCorsExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyCorsExampleAdapterTest.java new file mode 100644 index 0000000000..69a86949c0 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyCorsExampleAdapterTest.java @@ -0,0 +1,10 @@ +package org.keycloak.testsuite.adapter.example; + +/** + * + * @author fkiss + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeWildflyCorsExampleAdapterTest extends AbstractCorsExampleAdapterTest { + +} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyDemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyDemoExampleAdapterTest.java new file mode 100644 index 0000000000..108fc5b7cf --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyDemoExampleAdapterTest.java @@ -0,0 +1,10 @@ +package org.keycloak.testsuite.adapter.example; + +/** + * + * @author tkyjovsk + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeWildflyDemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyJSConsoleExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyJSConsoleExampleAdapterTest.java new file mode 100644 index 0000000000..38079978a7 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflyJSConsoleExampleAdapterTest.java @@ -0,0 +1,10 @@ +package org.keycloak.testsuite.adapter.example; + +/** + * + * @author tkyjovsk + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeWildflyJSConsoleExampleAdapterTest extends AbstractJSConsoleExampleAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflySAMLExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflySAMLExampleAdapterTest.java new file mode 100644 index 0000000000..303f0b479a --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/RelativeWildflySAMLExampleAdapterTest.java @@ -0,0 +1,10 @@ +package org.keycloak.testsuite.adapter.example; + +/** + * + * @author mhajas + */ +//@AdapterLibsLocationProperty("adapter.libs.eap") +public class RelativeWildflySAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { + +} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/resources/web.xml b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/resources/web.xml similarity index 100% rename from testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/resources/web.xml rename to testsuite/integration-arquillian/tests/other/adapters/jboss/relative/wildfly/src/test/resources/web.xml diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/pom.xml new file mode 100644 index 0000000000..f2b6752414 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/pom.xml @@ -0,0 +1,38 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-jboss + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-wildfly + + Adapter Tests - JBoss - Wildfly + + + wildfly + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/WildflyOIDCAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/WildflyOIDCAdapterTest.java new file mode 100644 index 0000000000..cd4ca90960 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/WildflyOIDCAdapterTest.java @@ -0,0 +1,14 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractDemoServletsAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-wildfly") +//@AdapterLibsLocationProperty("adapter.libs.wildfly") +public class WildflyOIDCAdapterTest extends AbstractDemoServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/WildflyOIDCSessionAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/WildflyOIDCSessionAdapterTest.java new file mode 100644 index 0000000000..e6324fa0f7 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/WildflyOIDCSessionAdapterTest.java @@ -0,0 +1,14 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSessionServletAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-wildfly") +//@AdapterLibsLocationProperty("adapter.libs.wildfly") +public class WildflyOIDCSessionAdapterTest extends AbstractSessionServletAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/WildflySAMLAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/WildflySAMLAdapterTest.java new file mode 100644 index 0000000000..8e004454e3 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/WildflySAMLAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSAMLServletsAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * @author mhajas + */ +@AppServerContainer("app-server-wildfly") +//@AdapterLibsLocationProperty("adapter.libs.wildfly") +public class WildflySAMLAdapterTest extends AbstractSAMLServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyBasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyBasicAuthExampleAdapterTest.java similarity index 68% rename from testsuite/integration-arquillian/tests/other/adapters/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyBasicAuthExampleAdapterTest.java rename to testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyBasicAuthExampleAdapterTest.java index e16c864db7..6fda250726 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyBasicAuthExampleAdapterTest.java +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyBasicAuthExampleAdapterTest.java @@ -1,6 +1,5 @@ package org.keycloak.testsuite.adapter.example; -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; /** @@ -8,7 +7,7 @@ import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; * @author tkyjovsk */ @AppServerContainer("app-server-wildfly") -@AdapterLibsLocationProperty("adapter.libs.wildfly") +//@AdapterLibsLocationProperty("adapter.libs.wildfly") public class WildflyBasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { } diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyDemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyDemoExampleAdapterTest.java similarity index 67% rename from testsuite/integration-arquillian/tests/other/adapters/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyDemoExampleAdapterTest.java rename to testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyDemoExampleAdapterTest.java index 3f1aa7de16..41d53cb709 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyDemoExampleAdapterTest.java +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyDemoExampleAdapterTest.java @@ -1,6 +1,5 @@ package org.keycloak.testsuite.adapter.example; -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; /** @@ -8,7 +7,7 @@ import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; * @author tkyjovsk */ @AppServerContainer("app-server-wildfly") -@AdapterLibsLocationProperty("adapter.libs.wildfly") +//@AdapterLibsLocationProperty("adapter.libs.wildfly") public class WildflyDemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { } \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflySAMLExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflySAMLExampleAdapterTest.java new file mode 100644 index 0000000000..e8627aaf21 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflySAMLExampleAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * @author mhajas + */ +@AppServerContainer("app-server-wildfly") +//@AdapterLibsLocationProperty("adapter.libs.wildfly") +public class WildflySAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { + +} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/pom.xml new file mode 100644 index 0000000000..9adb3318ad --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/pom.xml @@ -0,0 +1,38 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-jboss + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-wildfly8 + + Adapter Tests - JBoss - Wildfly 8 + + + wildfly8 + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/Wildfly8OIDCAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/Wildfly8OIDCAdapterTest.java new file mode 100644 index 0000000000..10f3d8d0bd --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/Wildfly8OIDCAdapterTest.java @@ -0,0 +1,14 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractDemoServletsAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-wildfly8") +//@AdapterLibsLocationProperty("adapter.libs.wildfly8") +public class Wildfly8OIDCAdapterTest extends AbstractDemoServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/Wildfly8OIDCSessionAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/Wildfly8OIDCSessionAdapterTest.java new file mode 100644 index 0000000000..06f2df7220 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/Wildfly8OIDCSessionAdapterTest.java @@ -0,0 +1,14 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSessionServletAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-wildfly8") +//@AdapterLibsLocationProperty("adapter.libs.wildfly8") +public class Wildfly8OIDCSessionAdapterTest extends AbstractSessionServletAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8BasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8BasicAuthExampleAdapterTest.java similarity index 58% rename from testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8BasicAuthExampleAdapterTest.java rename to testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8BasicAuthExampleAdapterTest.java index e746dd0e5f..03aa572500 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8BasicAuthExampleAdapterTest.java +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8BasicAuthExampleAdapterTest.java @@ -1,14 +1,13 @@ package org.keycloak.testsuite.adapter.example; -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; /** * * @author tkyjovsk */ -@AppServerContainer("app-server-wildfly") -@AdapterLibsLocationProperty("adapter.libs.wildfly") +@AppServerContainer("app-server-wildfly8") +//@AdapterLibsLocationProperty("adapter.libs.wildfly8") public class Wildfly8BasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { } diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8DemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8DemoExampleAdapterTest.java new file mode 100644 index 0000000000..9c6dd6cefe --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8DemoExampleAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-wildfly8") +//@AdapterLibsLocationProperty("adapter.libs.wildfly8") +public class Wildfly8DemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { + +} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/pom.xml new file mode 100644 index 0000000000..4049cd37f1 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/pom.xml @@ -0,0 +1,38 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-jboss + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-wildfly9 + + Adapter Tests - JBoss - Wildfly 9 + + + wildfly9 + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/Wildfly9OIDCAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/Wildfly9OIDCAdapterTest.java new file mode 100644 index 0000000000..621cd203d3 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/Wildfly9OIDCAdapterTest.java @@ -0,0 +1,14 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractDemoServletsAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-wildfly9") +//@AdapterLibsLocationProperty("adapter.libs.wildfly9") +public class Wildfly9OIDCAdapterTest extends AbstractDemoServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/Wildfly9OIDCSessionAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/Wildfly9OIDCSessionAdapterTest.java new file mode 100644 index 0000000000..3f7ddcec92 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/Wildfly9OIDCSessionAdapterTest.java @@ -0,0 +1,14 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSessionServletAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-wildfly9") +//@AdapterLibsLocationProperty("adapter.libs.wildfly9") +public class Wildfly9OIDCSessionAdapterTest extends AbstractSessionServletAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/Wildfly9SAMLAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/Wildfly9SAMLAdapterTest.java new file mode 100644 index 0000000000..77f8eb1781 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/Wildfly9SAMLAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSAMLServletsAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * @author mhajas + */ +@AppServerContainer("app-server-wildfly9") +//@AdapterLibsLocationProperty("adapter.libs.wildfly9") +public class Wildfly9SAMLAdapterTest extends AbstractSAMLServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9BasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9BasicAuthExampleAdapterTest.java new file mode 100644 index 0000000000..bb70e9eee3 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9BasicAuthExampleAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-wildfly9") +//@AdapterLibsLocationProperty("adapter.libs.wildfly9") +public class Wildfly9BasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9DemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9DemoExampleAdapterTest.java new file mode 100644 index 0000000000..d1af7fa996 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9DemoExampleAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-wildfly9") +//@AdapterLibsLocationProperty("adapter.libs.wildfly9") +public class Wildfly9DemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { + +} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9SAMLExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9SAMLExampleAdapterTest.java new file mode 100644 index 0000000000..7f551234e7 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9SAMLExampleAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * @author mhajas + */ +@AppServerContainer("app-server-wildfly9") +//@AdapterLibsLocationProperty("adapter.libs.wildfly9") +public class Wildfly9SAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { + +} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/xslt/arquillian-fuse.xsl b/testsuite/integration-arquillian/tests/other/adapters/karaf/common/xslt/arquillian.xsl similarity index 61% rename from testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/xslt/arquillian-fuse.xsl rename to testsuite/integration-arquillian/tests/other/adapters/karaf/common/xslt/arquillian.xsl index 245a2defb6..4ec665f4ed 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/xslt/arquillian-fuse.xsl +++ b/testsuite/integration-arquillian/tests/other/adapters/karaf/common/xslt/arquillian.xsl @@ -21,8 +21,6 @@ version="2.0" exclude-result-prefixes="xalan a"> - - @@ -30,23 +28,20 @@ - + - ${app.server.karaf} - org.keycloak.testsuite.arquillian.karaf.CustomKarafContainer + true + org.jboss.arquillian.container.osgi.karaf.managed.KarafManagedDeployableContainer + false - ${karaf.home} - -agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspend=n ${adapter.test.props} - service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root - admin - admin - - - features:addurl mvn:org.keycloak/keycloak-osgi-features//xml/features, - features:addurl mvn:org.keycloak.example.demo/keycloak-fuse-example-features//xml/features, - features:install keycloak-fuse-example + ${app.server.home} + + -agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspend=n + ${adapter.test.props} - + service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root + ${app.server.management.user} + ${app.server.management.password} diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/pom.xml new file mode 100644 index 0000000000..1a88d9379b --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/pom.xml @@ -0,0 +1,41 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-karaf + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-fuse61 + + Adapter Tests - Karaf - JBoss Fuse 6.1 + + + fuse61 + + admin + admin + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/src/test/java/org/keycloak/testsuite/adapter/example/KarafFuseExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/src/test/java/org/keycloak/testsuite/adapter/example/Fuse61ExampleAdapterTest.java similarity index 54% rename from testsuite/integration-arquillian/tests/other/adapters/karaf/src/test/java/org/keycloak/testsuite/adapter/example/KarafFuseExampleAdapterTest.java rename to testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/src/test/java/org/keycloak/testsuite/adapter/example/Fuse61ExampleAdapterTest.java index eaf5f19c39..122693fa33 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/src/test/java/org/keycloak/testsuite/adapter/example/KarafFuseExampleAdapterTest.java +++ b/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse61/src/test/java/org/keycloak/testsuite/adapter/example/Fuse61ExampleAdapterTest.java @@ -6,7 +6,7 @@ import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; * * @author tkyjovsk */ -@AppServerContainer("app-server-karaf") -public class KarafFuseExampleAdapterTest extends AbstractFuseExampleAdapterTest { - +@AppServerContainer("app-server-fuse61") +public class Fuse61ExampleAdapterTest extends AbstractFuseExampleAdapterTest { + } diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/pom.xml new file mode 100644 index 0000000000..dfe0540464 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/pom.xml @@ -0,0 +1,41 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-karaf + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-fuse62 + + Adapter Tests - Karaf - JBoss Fuse 6.2 + + + fuse62 + + admin + admin + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/src/test/java/org/keycloak/testsuite/adapter/example/Fuse62ExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/src/test/java/org/keycloak/testsuite/adapter/example/Fuse62ExampleAdapterTest.java new file mode 100644 index 0000000000..73af6e9213 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/karaf/fuse62/src/test/java/org/keycloak/testsuite/adapter/example/Fuse62ExampleAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-fuse62") +public class Fuse62ExampleAdapterTest extends AbstractFuseExampleAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/pom.xml new file mode 100644 index 0000000000..12479a5f4b --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/pom.xml @@ -0,0 +1,41 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-karaf + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-karaf3 + + Adapter Tests - Karaf - Karaf 3 + + + karaf3 + + karaf + karaf + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/src/test/java/org/keycloak/testsuite/adapter/example/Karaf3ExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/src/test/java/org/keycloak/testsuite/adapter/example/Karaf3ExampleAdapterTest.java new file mode 100644 index 0000000000..ce0059e477 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/karaf/karaf3/src/test/java/org/keycloak/testsuite/adapter/example/Karaf3ExampleAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-karaf3") +public class Karaf3ExampleAdapterTest extends AbstractFuseExampleAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/karaf/pom.xml index ec06e25413..ef6353240f 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/pom.xml +++ b/testsuite/integration-arquillian/tests/other/adapters/karaf/pom.xml @@ -1,35 +1,41 @@ +~ Copyright 2016 Red Hat, Inc. and/or its affiliates +~ and other contributors as indicated by the @author tags. +~ +~ Licensed under the Apache License, Version 2.0 (the "License"); +~ you may not use this file except in compliance with the License. +~ You may obtain a copy of the License at +~ +~ http://www.apache.org/licenses/LICENSE-2.0 +~ +~ Unless required by applicable law or agreed to in writing, software +~ distributed under the License is distributed on an "AS IS" BASIS, +~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +~ See the License for the specific language governing permissions and +~ limitations under the License. +--> + + 4.0.0 + org.keycloak.testsuite integration-arquillian-tests-adapters 2.0.0.CR1-SNAPSHOT - 4.0.0 - integration-arquillian-adapters-karaf - Adapter Tests on Karaf - + integration-arquillian-tests-adapters-karaf + + pom + + Adapter Tests - Karaf + - + ${project.parent.basedir}/common + 0 8080 @@ -38,127 +44,96 @@ 8181 - - - - - org.jboss.arquillian.container - arquillian-container-karaf-managed - 2.1.0.CR18 - - - - org.apache.aries.jmx - org.apache.aries.jmx - 1.1.1 - - - - jline - jline - 2.12 - - - org.apache.sshd - sshd-core - 0.12.0 - - - org.apache.karaf.shell - org.apache.karaf.shell.console - 3.0.3 - - - org.apache.karaf - org.apache.karaf.client - 3.0.3 - - - - + - - fuse + adapter-test-karaf-submodules - - fuse.home - + + src + - - ${fuse.home} - src/main/xslt/arquillian-fuse.xsl - - - - - karaf - - - !fuse.home - - - - 3.0.3 - ${containers.home}/apache-karaf-minimal-${karaf.version} - + + + org.jboss.arquillian.container + arquillian-container-karaf-managed + 2.1.0.CR18 + + + + org.apache.aries.jmx + org.apache.aries.jmx + 1.1.1 + + + + jline + jline + 2.12 + + + org.apache.sshd + sshd-core + 0.12.0 + + + org.apache.karaf.shell + org.apache.karaf.shell.console + 3.0.3 + org.apache.karaf - apache-karaf-minimal - ${karaf.version} - zip - + org.apache.karaf.client + 3.0.3 + - org.apache.maven.plugins - maven-dependency-plugin + maven-enforcer-plugin - unpack-karaf - generate-resources - unpack + enforce - - - org.apache.karaf - apache-karaf-minimal - ${karaf.version} - zip - ${containers.home} - - - true + + + auth.server + (wildfly)|(eap) + Karaf/Fuse adapter tests require activation of profile "auth-server-wildfly" or "auth-server-eap". + + - + + + + + app-server-karaf3 + + karaf3 + + + + app-server-fuse61 + + fuse61 + + + + app-server-fuse62 + + fuse62 + + + - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - ${karaf.home} - - - - - org.codehaus.mojo - xml-maven-plugin - - - - - + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainer.java b/testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainer.java deleted file mode 100644 index e9f12127a5..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainer.java +++ /dev/null @@ -1,114 +0,0 @@ -package org.keycloak.testsuite.arquillian.karaf; - -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -import javax.management.InstanceNotFoundException; -import javax.management.MBeanServerConnection; -import javax.management.ObjectName; -import org.jboss.arquillian.container.osgi.jmx.ObjectNameFactory; -import org.jboss.arquillian.container.osgi.karaf.managed.KarafManagedDeployableContainer; -import org.jboss.arquillian.container.spi.client.container.LifecycleException; -import org.jboss.logging.Logger; - -/** - * - * @author tkyjovsk - */ -public class CustomKarafContainer extends KarafManagedDeployableContainer { - - protected final Logger log = Logger.getLogger(this.getClass()); - - private CustomKarafContainerConfiguration config; - - protected MBeanServerConnection mbeanServer = null; - protected ObjectName feature; - - @Override - public void start() throws LifecycleException { - super.start(); - executeAfterStartCommands(); - } - - @Override - public void setup(CustomKarafContainerConfiguration config) { - super.setup(config); - this.config = config; - } - - @Override - public Class getConfigurationClass() { - return CustomKarafContainerConfiguration.class; - } - - protected void executeAfterStartCommands() throws LifecycleException { - try { - mbeanServer = getMBeanServerConnection(500, TimeUnit.MILLISECONDS); - } catch (TimeoutException ex) { - throw new LifecycleException("JMX connection timed out."); - } - - try { - - feature = ObjectNameFactory.create("org.apache.karaf:type=feature,name=root"); - try { - mbeanServer.getObjectInstance(feature); - } catch (InstanceNotFoundException infe) { - try { - feature = ObjectNameFactory.create("org.apache.karaf:type=features,name=root"); - mbeanServer.getObjectInstance(feature); - } catch (InstanceNotFoundException infe2) { - throw new RuntimeException("Feature MBean not found on server."); - } - } - - featureMBean = getMBeanProxy(mbeanServer, feature, FeatureMBean.class, 30, TimeUnit.SECONDS); - - log.info("Executing karaf after-start commands"); - for (String command : config.getCommandsAfterStartAsArray()) { - String cmd = command.trim().split(" ")[0].trim(); - String param = command.trim().split(" ")[1].trim(); - log.info(String.format("command: %s, param: %s", cmd, param)); - switch (cmd) { - case "feature:repo-add": - case "features:addurl": - featureMBean.addRepository(param); - break; - case "feature:repo-remove": - case "features:removeurl": - featureMBean.removeRepository(param); - break; - case "feature:install": - case "features:install": - featureMBean.installFeature(param); - break; - case "feature:uninstall": - case "features:uninstall": - featureMBean.uninstallFeature(param); - break; - default: - throw new RuntimeException(String.format("Unsupported command: '%s'. " - + "Supported after-start commands for Karaf: 'feature:repo-add', 'feature:install', 'feature:repo-remove', 'feature:uninstall'\n" - + "Supported after-start commands for Fuse: 'features:addurl', 'features:install', 'features:removeurl', 'features:uninstall'", cmd)); - } - } - } catch (IOException | RuntimeException | TimeoutException ex) { - stop(); - throw new LifecycleException("Error when executing karaf after-start commands.", ex); - } - } - - FeatureMBean featureMBean; - - public interface FeatureMBean { - - public void addRepository(String repository); - - public void removeRepository(String repository); - - public void installFeature(String feature); - - public void uninstallFeature(String feature); - } - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainerConfiguration.java b/testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainerConfiguration.java deleted file mode 100644 index 05d063c89f..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/java/org/keycloak/testsuite/arquillian/karaf/CustomKarafContainerConfiguration.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.keycloak.testsuite.arquillian.karaf; - -import org.jboss.arquillian.container.osgi.karaf.managed.KarafManagedContainerConfiguration; - -/** - * - * @author tkyjovsk - */ -public class CustomKarafContainerConfiguration extends KarafManagedContainerConfiguration { - - private String commandsAfterStart; - - public String getCommandsAfterStart() { - return commandsAfterStart; - } - - public String[] getCommandsAfterStartAsArray() { - return getCommandsAfterStart().trim().split(","); - } - - public void setCommandsAfterStart(String commandsAfterStart) { - this.commandsAfterStart = commandsAfterStart; - } - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension deleted file mode 100644 index 7ac12d385f..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright 2016 Red Hat, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -org.keycloak.testsuite.arquillian.karaf.CustomKarafContainerExtension \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/xslt/arquillian.xsl b/testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/xslt/arquillian.xsl deleted file mode 100644 index 540e4ee4c4..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/karaf/src/main/xslt/arquillian.xsl +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - ${app.server.karaf} - - org.keycloak.testsuite.arquillian.karaf.CustomKarafContainer - false - ${karaf.home} - -agentlib:jdwp=transport=dt_socket,address=5005,server=y,suspend=n ${adapter.test.props} - service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root - karaf - karaf - - - - feature:repo-add mvn:org.apache.camel.karaf/apache-camel/2.15.1/xml/features, - feature:repo-add mvn:org.apache.cxf.karaf/apache-cxf/3.0.4/xml/features, - feature:repo-add mvn:org.keycloak/keycloak-osgi-features//xml/features, - feature:repo-add mvn:org.keycloak.example.demo/keycloak-fuse-example-features//xml/features, - feature:install keycloak-fuse-example - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/pom.xml index 23ef64250f..518d184807 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/pom.xml +++ b/testsuite/integration-arquillian/tests/other/adapters/pom.xml @@ -1,20 +1,20 @@ +~ Copyright 2016 Red Hat, Inc. and/or its affiliates +~ and other contributors as indicated by the @author tags. +~ +~ Licensed under the Apache License, Version 2.0 (the "License"); +~ you may not use this file except in compliance with the License. +~ You may obtain a copy of the License at +~ +~ http://www.apache.org/licenses/LICENSE-2.0 +~ +~ Unless required by applicable law or agreed to in writing, software +~ distributed under the License is distributed on an "AS IS" BASIS, +~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +~ See the License for the specific language governing permissions and +~ limitations under the License. +--> @@ -34,83 +34,140 @@ Adapter Tests + + ${common.resources}/xslt/arquillian.xsl + + integration-arquillian-servers-app-server-${app.server} + false + + manual + 200 8280 8643 + http-remoting 10190 10199 - false - -Dapp.server.base.url=http://localhost:${app.server.http.port} -Dmy.host.name=localhost - - + 60 + -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m + + false + + -Dapp.server.base.url=http://localhost:${app.server.http.port} -Dmy.host.name=localhost + + ${containers.home}/app-server-${app.server} + bundled + bundled - src/main/xslt/arquillian.xsl - false - - - - - - org.codehaus.mojo - xml-maven-plugin - - - add-app-server-to-arquillian-xml - process-resources - - transform - - - - - ${project.build.directory}/dependency - - arquillian.xml - - ${arquillian.xml.stylesheet} - - - keycloak.version - ${project.version} - - - ${project.build.directory}/dependency - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - ${app.server.port.offset} - ${app.server.http.port} - ${app.server.https.port} - ${app.server.management.port} - ${app.server.management.port.jmx} - ${app.server.ssl.required} - - ${adapter.test.props} - - bundled - provided - - - - ${exclude.adapters} - - - - - - + + + jboss + karaf + tomcat + + + adapter-test-submodules + + + src + + + + + + org.codehaus.mojo + xml-maven-plugin + + + add-app-server-to-arquillian-xml + process-resources + + transform + + + + + ${project.build.directory}/dependency + + arquillian.xml + + ${app.server.arquillian.xsl} + + + keycloak.version + ${project.version} + + + ${project.build.directory}/dependency + + + + + + + + maven-dependency-plugin + + + unpack-app-server + generate-test-resources + + unpack + + + + + org.keycloak.testsuite + ${app.server.artifactId} + ${project.version} + zip + + + ${containers.home} + ${app.server.skip.unpack} + + + + + + maven-surefire-plugin + + + ${app.server} + ${app.server.home} + ${app.server.java.home} + + ${app.server.mode} + + ${app.server.port.offset} + ${app.server.http.port} + ${app.server.https.port} + ${app.server.management.protocol} + ${app.server.management.user} + ${app.server.management.password} + ${app.server.management.port} + ${app.server.management.port.jmx} + ${app.server.ssl.required} + + ${app.server.startup.timeout} + ${app.server.memory.settings} + + ${adapter.test.props} + + ${adapter.libs.home} + ${adapter.libs.mode} + ${adapter.config.mode} + + + + + + + adapter-libs-provided @@ -118,21 +175,9 @@ !adapter.libs.bundled - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - provided - - - - - - + + provided + @@ -146,7 +191,6 @@ - org.apache.maven.plugins maven-dependency-plugin @@ -251,7 +295,6 @@ - org.apache.maven.plugins maven-surefire-plugin @@ -286,70 +329,6 @@ - - app-server-eap6 - - eap6 - - - - app-server-eap7 - - eap7 - - - - app-server-wildfly - - wildfly - - - - app-server-wildfly-relative - - wildfly-relative - - - - app-server-wildfly8 - - wildfly8 - - - - app-server-as7 - - as7 - - - - - app-server-tomcat - - tomcat - - - - app-server-karaf - - karaf - - - - no-adapter-tests - - - **/adapter/**/*Test.java - - - - no-relative - - - **/adapter/**/WildflyRelative*Test.java - - - diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/main/xslt/arquillian.xsl b/testsuite/integration-arquillian/tests/other/adapters/tomcat/common/xslt/arquillian.xsl similarity index 86% rename from testsuite/integration-arquillian/tests/other/adapters/tomcat/src/main/xslt/arquillian.xsl rename to testsuite/integration-arquillian/tests/other/adapters/tomcat/common/xslt/arquillian.xsl index dc2f202867..911242da21 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/main/xslt/arquillian.xsl +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/common/xslt/arquillian.xsl @@ -28,14 +28,14 @@ - + - ${app.server.tomcat} + true org.jboss.arquillian.container.tomcat.managed_7.TomcatManagedContainer - ${tomcat.home} - ${tomcat.home} + ${app.server.home} + ${app.server.home} ${app.server.http.port} - ${app.server.management.port.tomcat} + ${app.server.management.port} manager arquillian ${adapter.test.props} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/tomcat/pom.xml index 36d28152a6..462d4ff411 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/pom.xml +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/pom.xml @@ -1,153 +1,65 @@ +~ Copyright 2016 Red Hat, Inc. and/or its affiliates +~ and other contributors as indicated by the @author tags. +~ +~ Licensed under the Apache License, Version 2.0 (the "License"); +~ you may not use this file except in compliance with the License. +~ You may obtain a copy of the License at +~ +~ http://www.apache.org/licenses/LICENSE-2.0 +~ +~ Unless required by applicable law or agreed to in writing, software +~ distributed under the License is distributed on an "AS IS" BASIS, +~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +~ See the License for the specific language governing permissions and +~ limitations under the License. +--> + + 4.0.0 + org.keycloak.testsuite integration-arquillian-tests-adapters 2.0.0.CR1-SNAPSHOT - 4.0.0 - integration-arquillian-adapters-tomcat - Adapter Tests on Tomcat + integration-arquillian-tests-adapters-tomcat + + pom + + Adapter Tests - Tomcat - 8.0.23 - ${containers.home}/apache-tomcat-${tomcat.version} - + ${project.parent.basedir}/common + 0 8080 9990 - - - org.jboss.arquillian.container - arquillian-tomcat-managed-7 - 1.0.0.CR7 - - + + + app-server-tomcat7 + + tomcat7 + + + + app-server-tomcat8 + + tomcat8 + + + + app-server-tomcat9 + + tomcat9 + + + - - - - org.apache.maven.plugins - maven-dependency-plugin - 2.10 - - - unpack-tomcat-and-adapter - generate-test-resources - - unpack - - - - - org.apache.tomcat - tomcat - ${tomcat.version} - zip - ${containers.home} - - - org.keycloak - keycloak-tomcat8-adapter-dist - ${project.version} - zip - ${tomcat.home}/lib - - - true - - - - libs-for-tomcat - generate-test-resources - - copy - - - - - org.jboss.resteasy - resteasy-client - - - org.jboss.spec.javax.ws.rs - jboss-jaxrs-api_2.0_spec - - - org.jboss.resteasy - resteasy-jaxrs - - - commons-io - commons-io - 1.4 - - - ${tomcat.home}/lib - true - - - - - - org.codehaus.mojo - xml-maven-plugin - - - add-tomcat-manager-user - process-test-resources - - transform - - - - - ${tomcat.home}/conf - src/main/xslt/tomcat-users.xsl - - tomcat-users.xml - - ${tomcat.home}/conf - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - ${tomcat.home} - - 8089 - - - - - - - + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/example/TomcatBasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/example/TomcatBasicAuthExampleAdapterTest.java deleted file mode 100644 index 95cfac03a7..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/example/TomcatBasicAuthExampleAdapterTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.junit.Ignore; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-tomcat") -@Ignore -public class TomcatBasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { - - // TODO find out how to add context.xml dependent on app context (web.xml/module-name) -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/example/TomcatDemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/example/TomcatDemoExampleAdapterTest.java deleted file mode 100644 index 99b219d1e6..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/example/TomcatDemoExampleAdapterTest.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.junit.Ignore; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-tomcat") -@Ignore -public class TomcatDemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { - - // TODO find out how to add context.xml dependent on app context (web.xml/module-name) - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/servlet/TomcatDemoServletsAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/servlet/TomcatDemoServletsAdapterTest.java deleted file mode 100644 index 822a4dbc33..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/servlet/TomcatDemoServletsAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-tomcat") -public class TomcatDemoServletsAdapterTest extends AbstractDemoServletsAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/servlet/TomcatSessionServletAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/servlet/TomcatSessionServletAdapterTest.java deleted file mode 100644 index 7dae041aeb..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/src/test/java/org/keycloak/testsuite/adapter/servlet/TomcatSessionServletAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-tomcat") -public class TomcatSessionServletAdapterTest extends AbstractSessionServletAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/pom.xml new file mode 100644 index 0000000000..10162d8f6d --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/pom.xml @@ -0,0 +1,46 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-tomcat + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-tomcat7 + + Adapter Tests - Tomcat - Tomcat 7 + + + tomcat7 + + + + + org.jboss.arquillian.container + arquillian-tomcat-managed-7 + 1.0.0.CR7 + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCAdapterTest.java new file mode 100644 index 0000000000..0b1fd6e378 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractDemoServletsAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-tomcat7") +public class Tomcat7OIDCAdapterTest extends AbstractDemoServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCSessionAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCSessionAdapterTest.java new file mode 100644 index 0000000000..0e15d9c03c --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/Tomcat7OIDCSessionAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSessionServletAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-tomcat7") +public class Tomcat7OIDCSessionAdapterTest extends AbstractSessionServletAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat7BasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat7BasicAuthExampleAdapterTest.java new file mode 100644 index 0000000000..cd1e26b6b4 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat7BasicAuthExampleAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-tomcat7") +public class Tomcat7BasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat7DemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat7DemoExampleAdapterTest.java new file mode 100644 index 0000000000..cbfd42756e --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat7DemoExampleAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-tomcat7") +public class Tomcat7DemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { + +} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/pom.xml new file mode 100644 index 0000000000..5b75f6505b --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/pom.xml @@ -0,0 +1,46 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-tomcat + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-tomcat8 + + Adapter Tests - Tomcat - Tomcat 8 + + + tomcat8 + + + + + org.jboss.arquillian.container + arquillian-tomcat-managed-7 + 1.0.0.CR7 + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCAdapterTest.java new file mode 100644 index 0000000000..ce6255f2e2 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractDemoServletsAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-tomcat8") +public class Tomcat8OIDCAdapterTest extends AbstractDemoServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCSessionAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCSessionAdapterTest.java new file mode 100644 index 0000000000..36d8385002 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/Tomcat8OIDCSessionAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSessionServletAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-tomcat8") +public class Tomcat8OIDCSessionAdapterTest extends AbstractSessionServletAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8BasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8BasicAuthExampleAdapterTest.java new file mode 100644 index 0000000000..175ed9ef1a --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8BasicAuthExampleAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-tomcat8") +public class Tomcat8BasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8DemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8DemoExampleAdapterTest.java new file mode 100644 index 0000000000..ef3d06d0a4 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8DemoExampleAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-tomcat8") +public class Tomcat8DemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { + +} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/pom.xml new file mode 100644 index 0000000000..5de892f66d --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/pom.xml @@ -0,0 +1,46 @@ + + + + + + 4.0.0 + + + org.keycloak.testsuite + integration-arquillian-tests-adapters-tomcat + 2.0.0.CR1-SNAPSHOT + + + integration-arquillian-tests-adapters-tomcat9 + + Adapter Tests - Tomcat - Tomcat 9 + + + tomcat9 + + + + + org.jboss.arquillian.container + arquillian-tomcat-managed-7 + 1.0.0.CR7 + + + + \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCAdapterTest.java new file mode 100644 index 0000000000..e52fb4dff6 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractDemoServletsAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-tomcat9") +public class Tomcat9OIDCAdapterTest extends AbstractDemoServletsAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCSessionAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCSessionAdapterTest.java new file mode 100644 index 0000000000..6e880d859c --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/Tomcat9OIDCSessionAdapterTest.java @@ -0,0 +1,13 @@ +package org.keycloak.testsuite.adapter; + +import org.keycloak.testsuite.adapter.servlet.AbstractSessionServletAdapterTest; +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-tomcat9") +public class Tomcat9OIDCSessionAdapterTest extends AbstractSessionServletAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat9BasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat9BasicAuthExampleAdapterTest.java new file mode 100644 index 0000000000..221c006761 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat9BasicAuthExampleAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-tomcat9") +public class Tomcat9BasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { + +} diff --git a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat9DemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat9DemoExampleAdapterTest.java new file mode 100644 index 0000000000..56ae537146 --- /dev/null +++ b/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat9DemoExampleAdapterTest.java @@ -0,0 +1,12 @@ +package org.keycloak.testsuite.adapter.example; + +import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; + +/** + * + * @author tkyjovsk + */ +@AppServerContainer("app-server-tomcat9") +public class Tomcat9DemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { + +} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/pom.xml deleted file mode 100644 index bf38c82126..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/pom.xml +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-tests-adapters - 2.0.0.CR1-SNAPSHOT - - 4.0.0 - - integration-arquillian-adapters-wildfly-relative - Adapter Tests on Wildfly Relative - - - - ${containers.home}/keycloak-wildfly-adapter-dist - - - ${auth.server.http.port} - - - - - - org.wildfly - wildfly-arquillian-container-managed - - - org.keycloak - keycloak-wildfly-adapter-dist - zip - - - org.keycloak - keycloak-saml-wildfly-adapter-dist - zip - - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-auth-server-wildfly-profile - - enforce - - - - - auth-server-wildfly - - - - - - - - - - - - - - auth-server-wildfly - - - - - adapter-libs-bundled - - - adapter.libs.bundled - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-adapter - process-resources - - unpack - - - - - org.keycloak - keycloak-wildfly-adapter-dist - ${project.version} - zip - ${adapter.libs.wildfly} - - - org.keycloak - keycloak-saml-wildfly-adapter-dist - ${project.version} - zip - ${adapter.libs.wildfly} - - - - - - - - org.codehaus.mojo - xml-maven-plugin - - - configure-adapter-subsystem - process-resources - - transform - - - - - ${auth.server.container}/standalone/configuration - - standalone.xml - - src/main/xslt/standalone.xsl - ${auth.server.container}/standalone/configuration - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - ${adapter.libs.wildfly} - - - - - - - - diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/main/xslt/arquillian.xsl b/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/main/xslt/arquillian.xsl deleted file mode 100644 index dc4c329d9c..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/main/xslt/arquillian.xsl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/main/xslt/standalone.xsl b/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/main/xslt/standalone.xsl deleted file mode 100644 index 441a3550d7..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/main/xslt/standalone.xsl +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeBasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeBasicAuthExampleAdapterTest.java deleted file mode 100644 index 5f45ebe23e..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeBasicAuthExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; - -/** - * - * @author tkyjovsk - */ -@AdapterLibsLocationProperty("adapter.libs.wildfly") -public class WildflyRelativeBasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeCorsExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeCorsExampleAdapterTest.java deleted file mode 100644 index 42ad34648e..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeCorsExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; - -/** - * - * @author fkiss - */ -@AdapterLibsLocationProperty("adapter.libs.wildfly") -public class WildflyRelativeCorsExampleAdapterTest extends AbstractCorsExampleAdapterTest { - -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeDemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeDemoExampleAdapterTest.java deleted file mode 100644 index afae8852b5..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeDemoExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; - -/** - * - * @author tkyjovsk - */ -@AdapterLibsLocationProperty("adapter.libs.wildfly") -public class WildflyRelativeDemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeJSConsoleExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeJSConsoleExampleAdapterTest.java deleted file mode 100644 index c0026d088c..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeJSConsoleExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; - -/** - * - * @author tkyjovsk - */ -@AdapterLibsLocationProperty("adapter.libs.wildfly") -public class WildflyRelativeJSConsoleExampleAdapterTest extends AbstractJSConsoleExampleAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeSAMLExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeSAMLExampleAdapterTest.java deleted file mode 100644 index 6e0c6df5e2..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/example/WildflyRelativeSAMLExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; - -/** - * - * @author mhajas - */ -@AdapterLibsLocationProperty("adapter.libs.wildfly") -public class WildflyRelativeSAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { - -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyRelativeDemoServletsAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyRelativeDemoServletsAdapterTest.java deleted file mode 100644 index b23cfc5478..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyRelativeDemoServletsAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; - -/** - * - * @author tkyjovsk - */ -@AdapterLibsLocationProperty("adapter.libs.wildfly") -public class WildflyRelativeDemoServletsAdapterTest extends AbstractDemoServletsAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyRelativeSAMLServletsAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyRelativeSAMLServletsAdapterTest.java deleted file mode 100644 index 9fbdf5a0c7..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyRelativeSAMLServletsAdapterTest.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; - -/** - * @author mhajas - */ -@AdapterLibsLocationProperty("adapter.libs.wildfly") -public class WildflyRelativeSAMLServletsAdapterTest extends AbstractSAMLServletsAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyRelativeSessionServletAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyRelativeSessionServletAdapterTest.java deleted file mode 100644 index 17a3ae56d8..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly-relative/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyRelativeSessionServletAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; - -/** - * - * @author tkyjovsk - */ -@AdapterLibsLocationProperty("adapter.libs.wildfly") -public class WildflyRelativeSessionServletAdapterTest extends AbstractSessionServletAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/wildfly/pom.xml deleted file mode 100644 index 3fda9e0ff2..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly/pom.xml +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - 4.0.0 - - - org.keycloak.testsuite - integration-arquillian-tests-adapters - 2.0.0.CR1-SNAPSHOT - - - integration-arquillian-adapters-wildfly - - Adapter Tests on Wildfly - - - ${containers.home}/wildfly-${wildfly.version} - ${containers.home}/keycloak-wildfly-adapter-dist - - - - - org.wildfly - wildfly-dist - zip - - - org.wildfly - wildfly-arquillian-container-managed - - - org.keycloak - keycloak-wildfly-adapter-dist - zip - - - org.keycloak - keycloak-saml-wildfly-adapter-dist - zip - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-wildfly-and-adapter - generate-resources - - unpack - - - - - org.wildfly - wildfly-dist - ${wildfly.version} - zip - ${containers.home} - - - org.keycloak - keycloak-wildfly-adapter-dist - ${project.version} - zip - ${adapter.libs.wildfly} - - - org.keycloak - keycloak-saml-wildfly-adapter-dist - ${project.version} - zip - ${adapter.libs.wildfly} - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - ${app.server.wildfly.home} - ${adapter.libs.wildfly} - - - - - - org.codehaus.mojo - xml-maven-plugin - - - configure-adapter-debug-log - process-resources - - transform - - - - - ${app.server.wildfly.home}/standalone/configuration - - standalone.xml - - src/main/xslt/add-adapter-log-level.xsl - ${app.server.wildfly.home}/standalone/configuration - - - - - - - - - - - - adapter-libs-provided - - - !adapter.libs.bundled - - - - ${app.server.wildfly.home} - - - - ssl - - - app.server.ssl.required - - - - - - org.codehaus.mojo - xml-maven-plugin - - - configure-adapter-subsystem-security - process-resources - - transform - - - - - ${app.server.wildfly.home}/standalone/configuration - - standalone.xml - - src/main/xslt/security.xsl - ${app.server.wildfly.home}/standalone/configuration - - - - - - - - maven-resources-plugin - - - copy-keystore - process-resources - - copy-resources - - - ${app.server.wildfly.home}/standalone/configuration - - - src/main/keystore - - adapter.jks - keycloak.truststore - - - - - jks - truststore - - - - - - - - - - diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/keystore/adapter.jks b/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/keystore/adapter.jks deleted file mode 100644 index 57cc34b6c4c0eaf60347dd8f894d5e81ffbb173d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2232 zcmcgt={wX58=l|HU<{+iDB_G7YOxn&de8Nqzu^6Ff4J}G`S4u#^IZ3{Gruzrfk2>p0R9I5RmK&^ ztL_Xx|2@URlVxfTf$#tX5WYc7)sK zAidVkE`C^;kB@+T=}_8UJx}8E`+jtZlgB2kuWzwAep5(5L z605_}2^HYZO3u7zoq}wUA&-v+Lic*Y+gl6)YGY@9B_#4uUP7sW!1~tH#WR4mM*`leF4rbv@KAX0~NZg);l71+&Q-%mcz;p?%}!c{AkopNE0r8STMa@ z(TrOMlA!EQ^tW>vHOW1U|~^`z0@m!5%=f@Ys=u%la2yXWSydz(%2oeJTT*Q?`=FAJTN z@o|blPuayu>C&X0`c$)fJHC5&v>07#6GIBGrfIn}3R|BAIbIYhM#wM(o}<1jtv^9% z&Z#h4zS-aD%%|c{J2>k$(Qws)d_y&7^QBWa7j7EXp4?_}Taq5YO{tF?&p1HEFjczn zz{KnN2Pm(f&Zag3Fqd7ePju9(+5O>QxNwKC$e?VpQ*c*LTw0lA`sf&g+0}n09`OXM z9hbnDY|8OgwYn62^t@CXv?)RA8{Ja)maU}xrYYz^?T2{zNPp}8`qPcgOK>_$<}7uo zd_l?85?<ML|JX>?p$t~=FRF_l*UdM{xZ*DZOubHFv0nv_lT3=ZHygG1j2uq&**cN+ zP~oXt5UkBN9gIbB7TnMEnP?S3^VK9JwG{tmYC|C6o7ka8+Gf55tVya)$Ei`Bk(zN6 zEloNOb`bn?okY1er#IQf^h$Z1@3=Z~f! zM9*C@%s)4+qwD)#a0Yw-ebtdHxLHMrnr@%aPDF%aQQ=5X;#{#9FP~BpKCv;+$@9S1 zm{29r3;Oz|UK(%iekLT`09b^fK#*?)_o9(Q)oG-0wtlanMVEGHJ4QuKs&w^*(8K$t z+0iQ+`8VPWC~*u9{)MJqcwvwfqs{$dnykg6@GwtZ&6n7)uER6N!hdHY&jlqCK?4GT zc@aR^Zv+r(kq3hUP$*p4d|{Y?;^mi%HH=+H0e}Dxgy2FHAn^0Ttl_*Es5R{$g1|t{ zC`2@2-(M9z4C1_tpT8@^*O|C~FJAW~B!Pd``m7)(jN>oF8*svi~PSEJNAq_q^Y1!Apdm)#qhuAR2Bi(R%Z=mTU~UvO@< z%7WtQH5TtM-2=V`8BzoQKkPCa`g2O0xy)Fxj6knx{qQ@&N?=wH5%SxJ>9Nv^9k&_F zN)3GMjC|T3*=6?cQGP04XG8~UWR@i)NiVB&ODiVy2T@zGmspt^rjrNAcJ@#h009bd zgu?{v-U_io@PlxX)nW+g!lQ~qMSLDRpCqj&r=y0%{%zvk744Y_Knw!ubudy8*p=cO zQ`4@i;Amget}+&_yXMPcav3|#z#oHC8!J13zmB^;)UdWj(AxamE5+j8J+8PChteEg zNtL=1;EYF)W@-A18#7DoT8icr%7^Q0=+7*HEE@p>u#<=m~ zfeG(F$Y$!SniH2PW|Yo$h?GH<@P;E&@v-l4%0!b~s2)04=w+dY Jt?$>je*%%w*Z}|l diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/keystore/keycloak.truststore b/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/keystore/keycloak.truststore deleted file mode 100644 index 2df5170f9b39756055850ed3ad0c5d012aab1402..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1857 zcmezO_TO6u1_mZL=E})WPRz;3FD@}+U|MkMHlk@H8W4_LHnT8m&Fogw@|!Tij3-^a(24 zxS>4i;cs@HcH8_*%IE9ah3cCew{CaLFt^eX*I#(vlzYZ~#}B!TZPKMP5B0A8S79P0 zYrOhInU0UA*R##KSyv|aPRzPi@8jH1Uc5u^_%-Vft$&(iLtlN&IB=xKB_y`(W9Xub zjGBj^E2i(#=aHJeBk-#5xywcFGn5P%)o!M~s`~vzYUaoMPeFBpU#))>D;(~exz3P7 z`!C0{`zzP|OMe-((NeALrS`Pzb5_OQ;w?6M@lyQC4vmk}a;7`C&tJLjq4O2qKW)*6 zXIc6@7B!2FXJTe#U|g(dAa5WGj6zvH7BLo)FUuHABUY@FT*999?~z={<7W-mB#;9U zn2Lab$jIPcmbaJLw7lu;(A@;P(=-?N{B zKh9n4n;4ug%(47H=^2ZE5@`%Kr7Wt?-mUZsaa|W)@V{)5&FSsS?_61}5o=ZUd^2X`h;i+|kZX3@n30%2Qu2X-{lW8kT_B{!n9GZAOX>+hL=hl7g zDXVmLAKB3K;ppUbS1sMywK?bW9P->E=+Mn+W_rEiZxxfmPmdq-T#S4^_D<7TQ2%`X z-5<-(y5CxRHkF0(@XvX7`u0>Tyq)j#-ey61qG0t;sV4QsZ679V@zhM+@a0IPgiNf@ z%s`2`3)ee_Zn^Sd!|4a^%i{RD**_cm>S=QCW@ebaYaa9yiMmTDBE3bSUY(6+|nM{e3Hea`KDZEj@x%^88TqL zVC6JT>!{9&ySHc`T$iG>%jz^*Is#`%=Kf!Hn<}3Cn=@Brd%6D#?RWk&BP6yoGWA)` z-)MbHGcSy1OP;h_-iK93KD9nIsx%SiogA(ZTv5j`XHS(&_uDgHi~cmLOx^VE`k8yS zf%aXot3N1eMn`LXN-_L#WB(ZwjbrHtnjdr<*|2SB+OW;`Jg@wLdr!O8NYyqg-kbPZ z;;7Ke8Cw{|W8YpYnjiciZ&Re|xy@b&T&^E^UMIM(e7Cf0P4lP67X;OPnl9-xZO6Ih7^bG<^O+sfvUc1({JQodpT)7J%o~$D z`DSmJD^)tb$MaEXf5Tp{t?I@Xh3@f(^ - - - - - - - - - - - - - ${app.server.wildfly} - org.jboss.as.arquillian.container.managed.ManagedDeployableContainer - ${app.server.wildfly.home} - -Djboss.socket.binding.port-offset=${app.server.port.offset} -Xms64m -Xmx512m -XX:MaxPermSize=256m ${adapter.test.props} - ${app.server.management.port} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/xslt/security.xsl b/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/xslt/security.xsl deleted file mode 100644 index b1d4f546a3..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/xslt/security.xsl +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/xslt/standalone.xsl b/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/xslt/standalone.xsl deleted file mode 100644 index 07e5e1b888..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/main/xslt/standalone.xsl +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyDemoServletsAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyDemoServletsAdapterTest.java deleted file mode 100644 index eaa24fc33c..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflyDemoServletsAdapterTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-wildfly") -@AdapterLibsLocationProperty("adapter.libs.wildfly") -public class WildflyDemoServletsAdapterTest extends AbstractDemoServletsAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflySessionServletAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflySessionServletAdapterTest.java deleted file mode 100644 index 0b2b48921c..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly/src/test/java/org/keycloak/testsuite/adapter/servlet/WildflySessionServletAdapterTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-wildfly") -@AdapterLibsLocationProperty("adapter.libs.wildfly") -public class WildflySessionServletAdapterTest extends AbstractSessionServletAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly8/pom.xml b/testsuite/integration-arquillian/tests/other/adapters/wildfly8/pom.xml deleted file mode 100644 index 0503fb2bd3..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly8/pom.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - org.keycloak.testsuite - integration-arquillian-tests-adapters - 2.0.0.CR1-SNAPSHOT - - 4.0.0 - - integration-arquillian-adapters-wildfly8 - Adapter Tests on Wildfly 8 - - - 8.2.1.Final - - ${containers.home}/wildfly-${wildfly.version} - ${containers.home}/keycloak-wf8-adapter-dist - - - - - org.wildfly - wildfly-dist - zip - - - org.wildfly - wildfly-arquillian-container-managed - - - org.keycloak - keycloak-wf8-adapter-dist - zip - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-wildfly-and-adapter - generate-resources - - unpack - - - - - org.wildfly - wildfly-dist - ${wildfly.version} - zip - ${containers.home} - - - org.keycloak - keycloak-wf8-adapter-dist - ${project.version} - zip - ${adapter.libs.wildfly} - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - ${app.server.wildfly.home} - ${adapter.libs.wildfly} - - - - - - - - - adapter-libs-provided - - - !adapter.libs.bundled - - - - ${app.server.wildfly.home} - - - - diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/main/xslt/arquillian.xsl b/testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/main/xslt/arquillian.xsl deleted file mode 100644 index 15c5f6d2e8..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/main/xslt/arquillian.xsl +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - ${app.server.wildfly} - org.jboss.as.arquillian.container.managed.ManagedDeployableContainer - ${app.server.wildfly.home} - -Djboss.socket.binding.port-offset=${app.server.port.offset} -Xms64m -Xmx512m -XX:MaxPermSize=256m ${adapter.test.props} - ${app.server.management.port} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/test/java/org/keycloak/testsuite/adapter/servlet/Wildfly8DemoServletsAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/test/java/org/keycloak/testsuite/adapter/servlet/Wildfly8DemoServletsAdapterTest.java deleted file mode 100644 index 469c6cad83..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/test/java/org/keycloak/testsuite/adapter/servlet/Wildfly8DemoServletsAdapterTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-wildfly") -@AdapterLibsLocationProperty("adapter.libs.wildfly") -public class Wildfly8DemoServletsAdapterTest extends AbstractDemoServletsAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/test/java/org/keycloak/testsuite/adapter/servlet/Wildfly8SessionServletAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/test/java/org/keycloak/testsuite/adapter/servlet/Wildfly8SessionServletAdapterTest.java deleted file mode 100644 index a342403d7a..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/wildfly8/src/test/java/org/keycloak/testsuite/adapter/servlet/Wildfly8SessionServletAdapterTest.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.keycloak.testsuite.adapter.servlet; - -import org.keycloak.testsuite.arquillian.annotation.AdapterLibsLocationProperty; -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-wildfly") -@AdapterLibsLocationProperty("adapter.libs.wildfly") -public class Wildfly8SessionServletAdapterTest extends AbstractSessionServletAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/console/pom.xml b/testsuite/integration-arquillian/tests/other/console/pom.xml index 3f024099a9..2ddd65d660 100644 --- a/testsuite/integration-arquillian/tests/other/console/pom.xml +++ b/testsuite/integration-arquillian/tests/other/console/pom.xml @@ -35,7 +35,6 @@ - org.apache.maven.plugins maven-resources-plugin @@ -45,7 +44,7 @@ copy-resources - ${keycloak.home}/themes + ${auth.server.home}/themes src/main/resources/themes diff --git a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/authentication/PasswordPolicy.java b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/authentication/PasswordPolicy.java index 39ce3f0471..81e0f2dd78 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/authentication/PasswordPolicy.java +++ b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/authentication/PasswordPolicy.java @@ -1,7 +1,6 @@ package org.keycloak.testsuite.console.page.authentication; import org.jboss.arquillian.graphene.findby.ByJQuery; -import org.keycloak.testsuite.page.Form; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; @@ -15,7 +14,6 @@ import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement; * @author Petr Mensik * @author tkyjovsk * @author mhajas - * @author Vaclav Muzikar */ public class PasswordPolicy extends Authentication { @@ -30,10 +28,10 @@ public class PasswordPolicy extends Authentication { @FindBy(tagName = "select") private WebElement addPolicySelectElement; - @FindBy(tagName = "table") - private WebElement table; + @FindBy(css = "tr.ng-scope") + private List allRows; - public void addPolicy(Type policy, String value) { + public void addPolicy(PasswordPolicy.Type policy, String value) { waitUntilElement(addPolicySelectElement).is().present(); addPolicySelect.selectByVisibleText(policy.getName()); setPolicyValue(policy, value); @@ -41,36 +39,45 @@ public class PasswordPolicy extends Authentication { } - public void addPolicy(Type policy, int value) { + public void addPolicy(PasswordPolicy.Type policy, int value) { addPolicy(policy, String.valueOf(value)); } - public void addPolicy(Type policy) { + public void addPolicy(PasswordPolicy.Type policy) { addPolicySelect.selectByVisibleText(policy.getName()); primaryButton.click(); } - public void removePolicy(Type policy) { - getPolicyRow(policy).findElement(By.cssSelector("td.kc-action-cell")).click(); + public void removePolicy(PasswordPolicy.Type policy) { + int policyInputLocation = findPolicy(policy); + allRows.get(policyInputLocation).findElements(By.tagName("button")).get(0).click(); primaryButton.click(); } - public void editPolicy(Type policy, int value) { + public void editPolicy(PasswordPolicy.Type policy, int value) { editPolicy(policy, String.valueOf(value)); } - public void editPolicy(Type policy, String value) { + public void editPolicy(PasswordPolicy.Type policy, String value) { setPolicyValue(policy, value); primaryButton.click(); } - private void setPolicyValue(Type policy, String value) { - WebElement input = getPolicyRow(policy).findElement(By.tagName("input")); - Form.setInputValue(input, value); + private void setPolicyValue(PasswordPolicy.Type policy, String value) { + int policyInputLocation = findPolicy(policy); + WebElement input = allRows.get(policyInputLocation).findElement(By.tagName("input")); + input.clear(); + input.sendKeys(value); } - private WebElement getPolicyRow(Type policy) { - return table.findElement(By.xpath("//tr[td[text()='" + policy.getName() + "']]")); + private int findPolicy(PasswordPolicy.Type policy) { + for (int i = 0; i < allRows.size(); i++) { + String policyName = allRows.get(i).findElement(ByJQuery.selector("td:eq(0)")).getText(); + if (policyName.equals(policy.getName())) { + return i; + } + } + return 0; } public enum Type { diff --git a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/authentication/RequiredActions.java b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/authentication/RequiredActions.java index 7e4c29c9ff..b6f182a5b4 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/authentication/RequiredActions.java +++ b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/authentication/RequiredActions.java @@ -1,6 +1,5 @@ package org.keycloak.testsuite.console.page.authentication; -import org.keycloak.testsuite.util.WaitUtils; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; @@ -29,8 +28,6 @@ public class RequiredActions extends Authentication { } private void setRequiredActionValue(String id, boolean value) { - WaitUtils.waitUntilElement(requiredActionTable).is().present(); - WebElement checkbox = requiredActionTable.findElement(By.id(id)); if (checkbox.isSelected() != value) { diff --git a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/CreateClientForm.java b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/CreateClientForm.java index c289e67c41..0269e03191 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/CreateClientForm.java +++ b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/CreateClientForm.java @@ -1,6 +1,13 @@ package org.keycloak.testsuite.console.page.clients; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import org.jboss.arquillian.graphene.page.Page; import org.keycloak.representations.idm.ClientRepresentation; +import static org.keycloak.testsuite.auth.page.login.OIDCLogin.OIDC; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType.*; +import org.keycloak.testsuite.console.page.fragment.OnOffSwitch; import org.keycloak.testsuite.page.Form; import static org.keycloak.testsuite.page.Form.getInputValue; import static org.keycloak.testsuite.util.WaitUtils.*; @@ -21,6 +28,13 @@ public class CreateClientForm extends Form { @FindBy(id = "protocol") private Select protocolSelect; + @Page + private SAMLClientSettingsForm samlForm; + + public SAMLClientSettingsForm samlForm() { + return samlForm; + } + public void setValues(ClientRepresentation client) { waitUntilElement(clientIdInput).is().present(); @@ -36,6 +50,22 @@ public class CreateClientForm extends Form { setInputValue(clientIdInput, clientId); } + public enum OidcAccessType { + BEARER_ONLY("bearer-only"), + PUBLIC("public"), + CONFIDENTIAL("confidential"); + + private final String name; + + private OidcAccessType(String name) { + this.name = name; + } + + public String getName() { + return name; + } + } + public String getProtocol() { waitUntilElement(protocolSelect.getFirstSelectedOption()).is().present(); return protocolSelect.getFirstSelectedOption().getText(); @@ -46,4 +76,86 @@ public class CreateClientForm extends Form { protocolSelect.selectByVisibleText(protocol); Timer.DEFAULT.reset("clientSettings.setProtocol()"); } -} \ No newline at end of file + + public class SAMLClientSettingsForm extends Form { + + public static final String SAML_ASSERTION_SIGNATURE = "saml.assertion.signature"; + public static final String SAML_AUTHNSTATEMENT = "saml.authnstatement"; + public static final String SAML_CLIENT_SIGNATURE = "saml.client.signature"; + public static final String SAML_ENCRYPT = "saml.encrypt"; + public static final String SAML_FORCE_POST_BINDING = "saml.force.post.binding"; + public static final String SAML_MULTIVALUED_ROLES = "saml.multivalued.roles"; + public static final String SAML_SERVER_SIGNATURE = "saml.server.signature"; + public static final String SAML_SIGNATURE_ALGORITHM = "saml.signature.algorithm"; + public static final String SAML_ASSERTION_CONSUMER_URL_POST = "saml_assertion_consumer_url_post"; + public static final String SAML_ASSERTION_CONSUMER_URL_REDIRECT = "saml_assertion_consumer_url_redirect"; + public static final String SAML_FORCE_NAME_ID_FORMAT = "saml_force_name_id_format"; + public static final String SAML_NAME_ID_FORMAT = "saml_name_id_format"; + public static final String SAML_SIGNATURE_CANONICALIZATION_METHOD = "saml_signature_canonicalization_method"; + public static final String SAML_SINGLE_LOGOUT_SERVICE_URL_POST = "saml_single_logout_service_url_post"; + public static final String SAML_SINGLE_LOGOUT_SERVICE_URL_REDIRECT = "saml_single_logout_service_url_redirect"; + + @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='samlAuthnStatement']]") + private OnOffSwitch samlAuthnStatement; + @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='samlServerSignature']]") + private OnOffSwitch samlServerSignature; + @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='samlAssertionSignature']]") + private OnOffSwitch samlAssertionSignature; + @FindBy(id = "signatureAlgorithm") + private Select signatureAlgorithm; + @FindBy(id = "canonicalization") + private Select canonicalization; + @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='samlEncrypt']]") + private OnOffSwitch samlEncrypt; + @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='samlClientSignature']]") + private OnOffSwitch samlClientSignature; + @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='samlForcePostBinding']]") + private OnOffSwitch samlForcePostBinding; + @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='frontchannelLogout']]") + private OnOffSwitch frontchannelLogout; + @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='samlForceNameIdFormat']]") + private OnOffSwitch samlForceNameIdFormat; + @FindBy(id = "samlNameIdFormat") + private Select samlNameIdFormat; + + @FindBy(xpath = "//fieldset[contains(@data-ng-show, 'saml')]//i") + private WebElement fineGrainCollapsor; + + @FindBy(id = "consumerServicePost") + private WebElement consumerServicePostInput; + @FindBy(id = "consumerServiceRedirect") + private WebElement consumerServiceRedirectInput; + @FindBy(id = "logoutPostBinding") + private WebElement logoutPostBindingInput; + @FindBy(id = "logoutRedirectBinding") + private WebElement logoutRedirectBindingInput; + + public void setValues(ClientRepresentation client) { + waitUntilElement(fineGrainCollapsor).is().visible(); + + Map attributes = client.getAttributes(); + samlAuthnStatement.setOn("true".equals(attributes.get(SAML_AUTHNSTATEMENT))); + samlServerSignature.setOn("true".equals(attributes.get(SAML_SERVER_SIGNATURE))); + samlAssertionSignature.setOn("true".equals(attributes.get(SAML_ASSERTION_SIGNATURE))); + if (samlServerSignature.isOn() || samlAssertionSignature.isOn()) { + signatureAlgorithm.selectByVisibleText(attributes.get(SAML_SIGNATURE_ALGORITHM)); + canonicalization.selectByValue("string:" + attributes.get(SAML_SIGNATURE_CANONICALIZATION_METHOD)); + } + samlEncrypt.setOn("true".equals(attributes.get(SAML_ENCRYPT))); + samlClientSignature.setOn("true".equals(attributes.get(SAML_CLIENT_SIGNATURE))); + samlForcePostBinding.setOn("true".equals(attributes.get(SAML_FORCE_POST_BINDING))); + frontchannelLogout.setOn(client.isFrontchannelLogout()); + samlForceNameIdFormat.setOn("true".equals(attributes.get(SAML_FORCE_NAME_ID_FORMAT))); + samlNameIdFormat.selectByVisibleText(attributes.get(SAML_NAME_ID_FORMAT)); + + fineGrainCollapsor.click(); + waitUntilElement(consumerServicePostInput).is().present(); + + setInputValue(consumerServicePostInput, attributes.get(SAML_ASSERTION_CONSUMER_URL_POST)); + setInputValue(consumerServiceRedirectInput, attributes.get(SAML_ASSERTION_CONSUMER_URL_REDIRECT)); + setInputValue(logoutPostBindingInput, attributes.get(SAML_SINGLE_LOGOUT_SERVICE_URL_POST)); + setInputValue(logoutRedirectBindingInput, attributes.get(SAML_SINGLE_LOGOUT_SERVICE_URL_REDIRECT)); + } + } + +} diff --git a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/credentials/ClientCredentialsGeneratePrivateKeysForm.java b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/credentials/ClientCredentialsGeneratePrivateKeysForm.java index f5afcacdc6..1994c0af80 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/credentials/ClientCredentialsGeneratePrivateKeysForm.java +++ b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/credentials/ClientCredentialsGeneratePrivateKeysForm.java @@ -22,7 +22,6 @@ package org.keycloak.testsuite.console.page.clients.credentials; import org.keycloak.testsuite.page.Form; -import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.ui.Select; @@ -69,7 +68,6 @@ public class ClientCredentialsGeneratePrivateKeysForm extends Form { } public void clickGenerateAndDownload() { - waitUntilElement(generateAndDownloadButton).is().present(); generateAndDownloadButton.click(); } } diff --git a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/mappers/CreateClientMappersForm.java b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/mappers/CreateClientMappersForm.java index 9eae0bef8f..73957bc289 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/mappers/CreateClientMappersForm.java +++ b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/mappers/CreateClientMappersForm.java @@ -2,7 +2,6 @@ package org.keycloak.testsuite.console.page.clients.mappers; import org.keycloak.testsuite.console.page.fragment.OnOffSwitch; import org.keycloak.testsuite.page.Form; -import static org.keycloak.testsuite.util.WaitUtils.pause; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.ui.Select; @@ -110,7 +109,6 @@ public class CreateClientMappersForm extends Form { realmAvailable.selectByVisibleText(roleName); } selectRealmRoleButton.click(); - pause(500); // wait for the modal dialog to fade out } public void selectClientRole(String clientName, String roleName) { @@ -119,7 +117,6 @@ public class CreateClientMappersForm extends Form { clientAvailable.selectByVisibleText(roleName); } selectClientRoleButton.click(); - pause(500); // wait for the modal dialog to fade out } } diff --git a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/settings/ClientSettingsForm.java b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/settings/ClientSettingsForm.java index 17c98df157..1e89e989ca 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/settings/ClientSettingsForm.java +++ b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/clients/settings/ClientSettingsForm.java @@ -8,13 +8,14 @@ import org.openqa.selenium.support.FindBy; import java.util.ArrayList; import java.util.List; -import java.util.Map; import org.keycloak.testsuite.console.page.clients.CreateClientForm; import org.openqa.selenium.support.ui.Select; -import org.keycloak.testsuite.page.Form; +import static org.keycloak.testsuite.auth.page.login.Login.OIDC; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType.BEARER_ONLY; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType.CONFIDENTIAL; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType.PUBLIC; import static org.keycloak.testsuite.util.WaitUtils.pause; -import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement; /** * @author tkyjovsk @@ -51,11 +52,11 @@ public class ClientSettingsForm extends CreateClientForm { @FindBy(id = "newRedirectUri") private WebElement newRedirectUriInput; - @FindBy(xpath = ".//i[contains(@data-ng-click, 'newRedirectUri') and @class='fa fa-plus']") + @FindBy(xpath = ".//i[contains(@data-ng-click, 'newRedirectUri')]") private WebElement newRedirectUriSubmit; @FindBy(xpath = ".//input[@ng-model='client.redirectUris[i]']") private List redirectUriInputs; - @FindBy(xpath = ".//i[contains(@data-ng-click, 'deleteRedirectUri') and @class='fa fa-minus']") + @FindBy(xpath = ".//i[contains(@data-ng-click, 'deleteRedirectUri')]") private List deleteRedirectUriIcons; @FindBy(id = "newWebOrigin") @@ -67,22 +68,9 @@ public class ClientSettingsForm extends CreateClientForm { @FindBy(xpath = ".//i[contains(@data-ng-click, 'deleteWebOrigin')]") private List deleteWebOriginIcons; - public enum OidcAccessType { - BEARER_ONLY("bearer-only"), - PUBLIC("public"), - CONFIDENTIAL("confidential"); - - private final String name; + @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='consentRequired']]") + private OnOffSwitch consentRequired; - private OidcAccessType(String name) { - this.name = name; - } - - public String getName() { - return name; - } - } - public void setBaseUrl(String baseUrl) { setInputValue(baseUrlInput, baseUrl); } @@ -125,6 +113,32 @@ public class ClientSettingsForm extends CreateClientForm { } } + @Override + public void setValues(ClientRepresentation client) { + super.setValues(client); + setName(client.getName()); + setEnabled(client.isEnabled()); + setConsentRequired(client.isConsentRequired()); + setBaseUrl(client.getBaseUrl()); + if (OIDC.equals(client.getProtocol())) { + setAccessType(client); + if (!client.isBearerOnly()) { + setStandardFlowEnabled(client.isStandardFlowEnabled()); + setDirectAccessGrantsEnabled(client.isDirectAccessGrantsEnabled()); + if (client.isPublicClient()) { + setImplicitFlowEnabled(client.isImplicitFlowEnabled()); + } else {//confidential + setServiceAccountsEnabled(client.isServiceAccountsEnabled()); + } + if (client.isStandardFlowEnabled() || client.isImplicitFlowEnabled()) { + setRedirectUris(client.getRedirectUris()); + } + } + setAdminUrl(client.getAdminUrl()); + setWebOrigins(client.getWebOrigins()); + } + } + public String getName() { return getInputValue(nameInput); } @@ -149,8 +163,14 @@ public class ClientSettingsForm extends CreateClientForm { consentRequiredSwitch.setOn(consentRequired); } - public void setAccessType(OidcAccessType accessType) { - accessTypeSelect.selectByVisibleText(accessType.getName()); + public void setAccessType(ClientRepresentation client) { + if (client.isBearerOnly()) { + accessTypeSelect.selectByVisibleText(BEARER_ONLY.getName()); + } else if (client.isPublicClient()) { + accessTypeSelect.selectByVisibleText(PUBLIC.getName()); + } else { + accessTypeSelect.selectByVisibleText(CONFIDENTIAL.getName()); + } } public void addRedirectUri(String redirectUri) { @@ -213,86 +233,5 @@ public class ClientSettingsForm extends CreateClientForm { public void setServiceAccountsEnabled(boolean serviceAccountsEnabled) { serviceAccountsEnabledSwitch.setOn(serviceAccountsEnabled); } - - public class SAMLClientSettingsForm extends Form { - public static final String SAML_ASSERTION_SIGNATURE = "saml.assertion.signature"; - public static final String SAML_AUTHNSTATEMENT = "saml.authnstatement"; - public static final String SAML_CLIENT_SIGNATURE = "saml.client.signature"; - public static final String SAML_ENCRYPT = "saml.encrypt"; - public static final String SAML_FORCE_POST_BINDING = "saml.force.post.binding"; - public static final String SAML_MULTIVALUED_ROLES = "saml.multivalued.roles"; - public static final String SAML_SERVER_SIGNATURE = "saml.server.signature"; - public static final String SAML_SIGNATURE_ALGORITHM = "saml.signature.algorithm"; - public static final String SAML_ASSERTION_CONSUMER_URL_POST = "saml_assertion_consumer_url_post"; - public static final String SAML_ASSERTION_CONSUMER_URL_REDIRECT = "saml_assertion_consumer_url_redirect"; - public static final String SAML_FORCE_NAME_ID_FORMAT = "saml_force_name_id_format"; - public static final String SAML_NAME_ID_FORMAT = "saml_name_id_format"; - public static final String SAML_SIGNATURE_CANONICALIZATION_METHOD = "saml_signature_canonicalization_method"; - public static final String SAML_SINGLE_LOGOUT_SERVICE_URL_POST = "saml_single_logout_service_url_post"; - public static final String SAML_SINGLE_LOGOUT_SERVICE_URL_REDIRECT = "saml_single_logout_service_url_redirect"; - - @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='samlAuthnStatement']]") - private OnOffSwitch samlAuthnStatement; - @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='samlServerSignature']]") - private OnOffSwitch samlServerSignature; - @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='samlAssertionSignature']]") - private OnOffSwitch samlAssertionSignature; - @FindBy(id = "signatureAlgorithm") - private Select signatureAlgorithm; - @FindBy(id = "canonicalization") - private Select canonicalization; - @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='samlEncrypt']]") - private OnOffSwitch samlEncrypt; - @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='samlClientSignature']]") - private OnOffSwitch samlClientSignature; - @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='samlForcePostBinding']]") - private OnOffSwitch samlForcePostBinding; - @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='frontchannelLogout']]") - private OnOffSwitch frontchannelLogout; - @FindBy(xpath = ".//div[@class='onoffswitch' and ./input[@id='samlForceNameIdFormat']]") - private OnOffSwitch samlForceNameIdFormat; - @FindBy(id = "samlNameIdFormat") - private Select samlNameIdFormat; - - @FindBy(xpath = "//fieldset[contains(@data-ng-show, 'saml')]//i") - private WebElement fineGrainCollapsor; - - @FindBy(id = "consumerServicePost") - private WebElement consumerServicePostInput; - @FindBy(id = "consumerServiceRedirect") - private WebElement consumerServiceRedirectInput; - @FindBy(id = "logoutPostBinding") - private WebElement logoutPostBindingInput; - @FindBy(id = "logoutRedirectBinding") - private WebElement logoutRedirectBindingInput; - - public void setValues(ClientRepresentation client) { - waitUntilElement(fineGrainCollapsor).is().visible(); - - Map attributes = client.getAttributes(); - samlAuthnStatement.setOn("true".equals(attributes.get(SAML_AUTHNSTATEMENT))); - samlServerSignature.setOn("true".equals(attributes.get(SAML_SERVER_SIGNATURE))); - samlAssertionSignature.setOn("true".equals(attributes.get(SAML_ASSERTION_SIGNATURE))); - if (samlServerSignature.isOn() || samlAssertionSignature.isOn()) { - signatureAlgorithm.selectByVisibleText(attributes.get(SAML_SIGNATURE_ALGORITHM)); - canonicalization.selectByValue("string:" + attributes.get(SAML_SIGNATURE_CANONICALIZATION_METHOD)); - } - samlEncrypt.setOn("true".equals(attributes.get(SAML_ENCRYPT))); - samlClientSignature.setOn("true".equals(attributes.get(SAML_CLIENT_SIGNATURE))); - samlForcePostBinding.setOn("true".equals(attributes.get(SAML_FORCE_POST_BINDING))); - frontchannelLogout.setOn(client.isFrontchannelLogout()); - samlForceNameIdFormat.setOn("true".equals(attributes.get(SAML_FORCE_NAME_ID_FORMAT))); - samlNameIdFormat.selectByVisibleText(attributes.get(SAML_NAME_ID_FORMAT)); - - fineGrainCollapsor.click(); - waitUntilElement(consumerServicePostInput).is().present(); - - setInputValue(consumerServicePostInput, attributes.get(SAML_ASSERTION_CONSUMER_URL_POST)); - setInputValue(consumerServiceRedirectInput, attributes.get(SAML_ASSERTION_CONSUMER_URL_REDIRECT)); - setInputValue(logoutPostBindingInput, attributes.get(SAML_SINGLE_LOGOUT_SERVICE_URL_POST)); - setInputValue(logoutRedirectBindingInput, attributes.get(SAML_SINGLE_LOGOUT_SERVICE_URL_REDIRECT)); - } - } - -} \ No newline at end of file +} diff --git a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/federation/LdapUserProviderForm.java b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/federation/LdapUserProviderForm.java index 88e207cee3..2d927a942d 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/federation/LdapUserProviderForm.java +++ b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/federation/LdapUserProviderForm.java @@ -191,10 +191,6 @@ public class LdapUserProviderForm extends Form { vendorSelect.selectByVisibleText(vendor); } - public void selectVendor(int index) { - vendorSelect.selectByIndex(index); - } - public List getVendors() { waitUntilElement(By.id("vendor")).is().present(); diff --git a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/realm/RealmSettings.java b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/realm/RealmSettings.java index b6e51eba6d..208096227c 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/realm/RealmSettings.java +++ b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/realm/RealmSettings.java @@ -1,8 +1,6 @@ package org.keycloak.testsuite.console.page.realm; import org.keycloak.testsuite.console.page.AdminConsoleRealm; -import org.keycloak.testsuite.util.WaitUtils; -import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; @@ -13,14 +11,11 @@ import static org.keycloak.testsuite.util.WaitUtils.*; * @author tkyjovsk */ public class RealmSettings extends AdminConsoleRealm { - private static final String navTabsClassName = "nav-tabs"; - - @FindBy(className = navTabsClassName) + @FindBy(className = "nav-tabs") private RealmTabs realmTabs; public RealmTabs tabs() { - waitUntilElement(By.className(navTabsClassName)).is().present(); return realmTabs; } diff --git a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/roles/RoleCompositeRoles.java b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/roles/RoleCompositeRoles.java index b4ab777635..070f49acaf 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/roles/RoleCompositeRoles.java +++ b/testsuite/integration-arquillian/tests/other/console/src/main/java/org/keycloak/testsuite/console/page/roles/RoleCompositeRoles.java @@ -11,12 +11,9 @@ import java.util.Map; import java.util.Set; import org.keycloak.representations.idm.RoleRepresentation.Composites; import org.keycloak.testsuite.page.Form; -import static org.keycloak.testsuite.util.WaitUtils.pause; import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; -import org.openqa.selenium.logging.LogEntries; -import org.openqa.selenium.logging.LogEntry; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.ui.Select; @@ -109,7 +106,6 @@ public class RoleCompositeRoles extends Form { select.selectByVisibleText(role); } } - waitUntilElement(button).is().enabled(); button.click(); } } diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/authentication/OTPPolicyTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/authentication/OTPPolicyTest.java index 73173a7f22..2bd3a6b716 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/authentication/OTPPolicyTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/authentication/OTPPolicyTest.java @@ -32,7 +32,6 @@ import org.keycloak.testsuite.console.page.authentication.otppolicy.OTPPolicy; import org.keycloak.testsuite.console.page.authentication.otppolicy.OTPPolicyForm.Digits; import org.keycloak.testsuite.console.page.authentication.otppolicy.OTPPolicyForm.OTPHashAlg; import org.keycloak.testsuite.console.page.authentication.otppolicy.OTPPolicyForm.OTPType; -import org.keycloak.testsuite.util.WaitUtils; /** * @@ -46,7 +45,6 @@ public class OTPPolicyTest extends AbstractConsoleTest { @Before public void beforeOTPPolicyTest() { otpPolicyPage.navigateTo(); - WaitUtils.pause(1000); // wait for the form to fully render } @Test diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/AbstractClientTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/AbstractClientTest.java index 877aa3fdb2..0f68266450 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/AbstractClientTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/AbstractClientTest.java @@ -1,10 +1,12 @@ package org.keycloak.testsuite.console.clients; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.jboss.arquillian.graphene.page.Page; +import static org.junit.Assert.assertEquals; import org.junit.Before; import org.keycloak.admin.client.resource.ClientResource; import org.keycloak.admin.client.resource.ClientsResource; @@ -16,20 +18,32 @@ import org.keycloak.testsuite.console.AbstractConsoleTest; import org.keycloak.testsuite.console.page.clients.Client; import org.keycloak.testsuite.console.page.clients.Clients; import org.keycloak.testsuite.console.page.clients.CreateClient; +import org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType; +import org.keycloak.testsuite.console.page.clients.settings.ClientSettings; import org.keycloak.testsuite.util.WaitUtils; import org.openqa.selenium.By; + +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType.*; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_ASSERTION_CONSUMER_URL_POST; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_ASSERTION_CONSUMER_URL_REDIRECT; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_ASSERTION_SIGNATURE; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_AUTHNSTATEMENT; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_CLIENT_SIGNATURE; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_ENCRYPT; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_FORCE_NAME_ID_FORMAT; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_FORCE_POST_BINDING; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_MULTIVALUED_ROLES; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_NAME_ID_FORMAT; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_SERVER_SIGNATURE; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_SIGNATURE_ALGORITHM; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_SIGNATURE_CANONICALIZATION_METHOD; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_SINGLE_LOGOUT_SERVICE_URL_POST; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.SAMLClientSettingsForm.SAML_SINGLE_LOGOUT_SERVICE_URL_REDIRECT; import static org.keycloak.testsuite.util.AttributesAssert.assertEqualsBooleanAttributes; import static org.keycloak.testsuite.util.AttributesAssert.assertEqualsListAttributes; import static org.keycloak.testsuite.util.AttributesAssert.assertEqualsStringAttributes; -import static org.junit.Assert.assertEquals; -import static org.keycloak.testsuite.console.page.clients.settings.ClientSettingsForm.SAMLClientSettingsForm.SAML_AUTHNSTATEMENT; -import static org.keycloak.testsuite.console.page.clients.settings.ClientSettingsForm.SAMLClientSettingsForm.SAML_CLIENT_SIGNATURE; -import static org.keycloak.testsuite.console.page.clients.settings.ClientSettingsForm.SAMLClientSettingsForm.SAML_FORCE_NAME_ID_FORMAT; -import static org.keycloak.testsuite.console.page.clients.settings.ClientSettingsForm.SAMLClientSettingsForm.SAML_FORCE_POST_BINDING; -import static org.keycloak.testsuite.console.page.clients.settings.ClientSettingsForm.SAMLClientSettingsForm.SAML_NAME_ID_FORMAT; -import static org.keycloak.testsuite.console.page.clients.settings.ClientSettingsForm.SAMLClientSettingsForm.SAML_SERVER_SIGNATURE; -import static org.keycloak.testsuite.console.page.clients.settings.ClientSettingsForm.SAMLClientSettingsForm.SAML_SIGNATURE_ALGORITHM; import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlEquals; +import static org.keycloak.testsuite.util.WaitUtils.pause; /** * @@ -38,7 +52,7 @@ import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlEquals; public abstract class AbstractClientTest extends AbstractConsoleTest { public final String TEST_CLIENT_ID = "test-client"; - public final List TEST_REDIRECT_URIs = Arrays.asList(new String[]{"http://example.test/app/"}); + public final String TEST_REDIRECT_URIS = "http://example.test/app/*"; @Page protected Clients clientsPage; @@ -46,9 +60,12 @@ public abstract class AbstractClientTest extends AbstractConsoleTest { protected Client clientPage; // note: cannot call navigateTo() unless client id is set @Page protected CreateClient createClientPage; + @Page + protected ClientSettings clientSettingsPage; @Before public void beforeClientTest() { +// configure().clients(); clientsPage.navigateTo(); } @@ -59,35 +76,78 @@ public abstract class AbstractClientTest extends AbstractConsoleTest { createClientPage.form().setValues(client); createClientPage.form().save(); assertAlertSuccess(); + + pause(500); // To ensure that the form will be loaded completely + + clientSettingsPage.form().setValues(client); + if (SAML.equals(client.getProtocol())) { + createClientPage.form().samlForm().setValues(client); + } + clientSettingsPage.form().save(); } - public static ClientRepresentation createClientRep(String clientId, String protocol) { + private static ClientRepresentation createClientRep(String clientId) { ClientRepresentation client = new ClientRepresentation(); client.setClientId(clientId); client.setEnabled(true); - client.setProtocol(protocol); - - client.setDirectAccessGrantsEnabled(true); - client.setFullScopeAllowed(true); - client.setPublicClient(true); - client.setStandardFlowEnabled(true); - - if (protocol.equals(SAML)) { - client.setAttributes(getSAMLAttributes()); + client.setConsentRequired(false); + return client; + } + + public static ClientRepresentation createOidcClientRep(OidcAccessType accessType, String clientId, String... redirectUris) { + ClientRepresentation client = createClientRep(clientId); + + client.setProtocol(OIDC); + + switch (accessType) { + case BEARER_ONLY: + client.setBearerOnly(true); + break; + case PUBLIC: + client.setBearerOnly(false); + client.setPublicClient(true); + client.setStandardFlowEnabled(true); + client.setImplicitFlowEnabled(false); + client.setDirectAccessGrantsEnabled(true); + setRedirectUris(client, redirectUris); + break; + case CONFIDENTIAL: + client.setBearerOnly(false); + client.setPublicClient(false); + client.setStandardFlowEnabled(true); + client.setDirectAccessGrantsEnabled(true); + client.setServiceAccountsEnabled(true); + setRedirectUris(client, redirectUris); + break; } return client; } - public static Map getSAMLAttributes() { - Map attributes = new HashMap<>(); - attributes.put(SAML_CLIENT_SIGNATURE, "true"); - attributes.put(SAML_AUTHNSTATEMENT, "true"); - attributes.put(SAML_FORCE_POST_BINDING, "true"); - attributes.put(SAML_SERVER_SIGNATURE, "true"); - attributes.put(SAML_SIGNATURE_ALGORITHM, "RSA_SHA256"); - attributes.put(SAML_FORCE_NAME_ID_FORMAT, "false"); - attributes.put(SAML_NAME_ID_FORMAT, "username"); - return attributes; + public static ClientRepresentation createSamlClientRep(String clinetId) { + ClientRepresentation client = createClientRep(clinetId); + + client.setProtocol(SAML); + + client.setFrontchannelLogout(true); + client.setAttributes(getSAMLAttributes()); + + return client; + } + + private static void setRedirectUris(ClientRepresentation client, String... redirectUris) { + List redirectUrisList = new ArrayList<>(); + redirectUrisList.addAll(Arrays.asList(redirectUris)); + client.setRedirectUris(redirectUrisList); + } + + protected static void setExpectedWebOrigins(ClientRepresentation client) { + List webOrigins = new ArrayList<>(); + for (String redirectUri : client.getRedirectUris()) { + //parse webOrigin from redirectUri: take substring from index 0 to + //first occurence of "/", excluded "http://" by starting search on index 7 + webOrigins.add(redirectUri.substring(0, redirectUri.indexOf("/", 7))); + } + client.setWebOrigins(webOrigins); } public ClientRepresentation findClientByClientId(String clientId) { @@ -112,12 +172,16 @@ public abstract class AbstractClientTest extends AbstractConsoleTest { if (c1.getProtocol().equals(OIDC)) { assertEqualsBooleanAttributes(c1.isBearerOnly(), c2.isBearerOnly()); - assertEqualsBooleanAttributes(c1.isDirectAccessGrantsEnabled(), c2.isDirectAccessGrantsEnabled()); - assertEqualsBooleanAttributes(c1.isPublicClient(), c2.isPublicClient()); - assertEqualsListAttributes(c1.getWebOrigins(), c2.getWebOrigins()); - assertEqualsStringAttributes(c1.getAdminUrl(), c2.getAdminUrl()); + if (!c1.isBearerOnly()) { + assertEqualsBooleanAttributes(c1.isDirectAccessGrantsEnabled(), c2.isDirectAccessGrantsEnabled()); + assertEqualsBooleanAttributes(c1.isPublicClient(), c2.isPublicClient()); + assertEqualsListAttributes(c1.getWebOrigins(), c2.getWebOrigins()); + assertEqualsStringAttributes(c1.getAdminUrl(), c2.getAdminUrl()); + } assertEqualsBooleanAttributes(c1.isSurrogateAuthRequired(), c2.isSurrogateAuthRequired()); assertEqualsBooleanAttributes(c1.isServiceAccountsEnabled(), c2.isServiceAccountsEnabled()); + } else if (c1.getProtocol().equals(SAML)) { + assertEqualsBooleanAttributes(c1.isFrontchannelLogout(), c2.isFrontchannelLogout()); } } @@ -127,6 +191,26 @@ public abstract class AbstractClientTest extends AbstractConsoleTest { } } + protected static Map getSAMLAttributes() { + Map attributes = new HashMap<>(); + attributes.put(SAML_ASSERTION_SIGNATURE, "true"); + attributes.put(SAML_AUTHNSTATEMENT, "false"); + attributes.put(SAML_CLIENT_SIGNATURE, "true"); + attributes.put(SAML_ENCRYPT, "true"); + attributes.put(SAML_FORCE_POST_BINDING, "true"); + attributes.put(SAML_MULTIVALUED_ROLES, "false"); + attributes.put(SAML_SERVER_SIGNATURE, "true"); + attributes.put(SAML_SIGNATURE_ALGORITHM, "RSA_SHA512"); + attributes.put(SAML_ASSERTION_CONSUMER_URL_POST, "http://example0.test"); + attributes.put(SAML_ASSERTION_CONSUMER_URL_REDIRECT, "http://example1.test"); + attributes.put(SAML_FORCE_NAME_ID_FORMAT, "true"); + attributes.put(SAML_NAME_ID_FORMAT, "email"); + attributes.put(SAML_SIGNATURE_CANONICALIZATION_METHOD, "http://www.w3.org/2001/10/xml-exc-c14n#WithComments"); + attributes.put(SAML_SINGLE_LOGOUT_SERVICE_URL_POST, "http://example2.test"); + attributes.put(SAML_SINGLE_LOGOUT_SERVICE_URL_REDIRECT, "http://example3.test"); + return attributes; + } + public ProtocolMapperRepresentation findClientMapperByName(String clientId, String mapperName) { ProtocolMapperRepresentation found = null; for (ProtocolMapperRepresentation mapper : testRealmResource().clients().get(clientId).getProtocolMappers().getMappers()) { @@ -145,4 +229,4 @@ public abstract class AbstractClientTest extends AbstractConsoleTest { return clientsResource().get(id); } -} \ No newline at end of file +} diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientClusteringTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientClusteringTest.java index d0c6743e9c..c2f8eec834 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientClusteringTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientClusteringTest.java @@ -26,7 +26,8 @@ import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; import org.keycloak.representations.idm.ClientRepresentation; -import static org.keycloak.testsuite.auth.page.login.Login.OIDC; +import static org.keycloak.testsuite.console.clients.AbstractClientTest.createOidcClientRep; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType.CONFIDENTIAL; import org.keycloak.testsuite.console.page.clients.clustering.ClientClustering; /** @@ -43,7 +44,7 @@ public class ClientClusteringTest extends AbstractClientTest { @Before public void before() { - newClient = createClientRep(TEST_CLIENT_ID, OIDC); + newClient = createOidcClientRep(CONFIDENTIAL, TEST_CLIENT_ID, TEST_REDIRECT_URIS); testRealmResource().clients().create(newClient).close(); found = findClientByClientId(TEST_CLIENT_ID); @@ -94,4 +95,4 @@ public class ClientClusteringTest extends AbstractClientTest { clientClusteringPage.form().addNode(""); assertAlertDanger(); } -} \ No newline at end of file +} diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientCredentialsTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientCredentialsTest.java index d489f4e5cc..4030231755 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientCredentialsTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientCredentialsTest.java @@ -26,7 +26,8 @@ import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; import org.keycloak.representations.idm.ClientRepresentation; -import static org.keycloak.testsuite.auth.page.login.Login.OIDC; +import static org.keycloak.testsuite.console.clients.AbstractClientTest.createOidcClientRep; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType.CONFIDENTIAL; import org.keycloak.testsuite.console.page.clients.credentials.ClientCredentials; import org.keycloak.testsuite.console.page.clients.credentials.ClientCredentialsGeneratePrivateKeys; import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlEquals; @@ -46,7 +47,7 @@ public class ClientCredentialsTest extends AbstractClientTest { @Before public void before() { - newClient = createClientRep(TEST_CLIENT_ID, OIDC); + newClient = createOidcClientRep(CONFIDENTIAL, TEST_CLIENT_ID, TEST_REDIRECT_URIS); testRealmResource().clients().create(newClient).close(); ClientRepresentation found = findClientByClientId(TEST_CLIENT_ID); @@ -82,4 +83,4 @@ public class ClientCredentialsTest extends AbstractClientTest { // generatePrivateKeysPage.generateForm().setStorePassword("pass2"); // assertAlertSuccess();//fails with phantomjs } -} \ No newline at end of file +} diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientInstallationTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientInstallationTest.java index 0af4bf4229..bf7bb06f12 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientInstallationTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientInstallationTest.java @@ -26,8 +26,9 @@ import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; import org.keycloak.representations.idm.ClientRepresentation; -import static org.keycloak.testsuite.auth.page.login.Login.OIDC; +import static org.keycloak.testsuite.console.clients.AbstractClientTest.createOidcClientRep; import org.keycloak.testsuite.console.page.clients.installation.ClientInstallation; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType.CONFIDENTIAL; /** * @@ -43,7 +44,7 @@ public class ClientInstallationTest extends AbstractClientTest { @Before public void before() { - newClient = createClientRep(TEST_CLIENT_ID, OIDC); + newClient = createOidcClientRep(CONFIDENTIAL, TEST_CLIENT_ID, TEST_REDIRECT_URIS); testRealmResource().clients().create(newClient).close(); found = findClientByClientId(TEST_CLIENT_ID); @@ -63,4 +64,4 @@ public class ClientInstallationTest extends AbstractClientTest { clientInstallationPage.form().setConfigFormat("Keycloak OIDC JBoss Subsystem XML"); assertTrue(clientInstallationPage.form().getTextareaContent().contains("test")); } -} \ No newline at end of file +} diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientMappersOIDCTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientMappersOIDCTest.java index 850bb39bdf..084f317f45 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientMappersOIDCTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientMappersOIDCTest.java @@ -31,8 +31,7 @@ import static org.junit.Assert.*; import org.junit.Before; import org.keycloak.representations.idm.ClientRepresentation; import org.keycloak.representations.idm.ProtocolMapperRepresentation; -import static org.keycloak.testsuite.auth.page.login.Login.OIDC; -import static org.keycloak.testsuite.console.clients.AbstractClientTest.createClientRep; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType.CONFIDENTIAL; import org.keycloak.testsuite.console.page.clients.mappers.ClientMapper; import org.keycloak.testsuite.console.page.clients.mappers.ClientMappers; import org.keycloak.testsuite.console.page.clients.mappers.CreateClientMappers; @@ -56,7 +55,7 @@ public class ClientMappersOIDCTest extends AbstractClientTest { @Before public void beforeClientMappersTest() { - ClientRepresentation newClient = createClientRep(TEST_CLIENT_ID, OIDC); + ClientRepresentation newClient = createOidcClientRep(CONFIDENTIAL, TEST_CLIENT_ID, TEST_REDIRECT_URIS); testRealmResource().clients().create(newClient).close(); id = findClientByClientId(TEST_CLIENT_ID).getId(); @@ -376,4 +375,4 @@ public class ClientMappersOIDCTest extends AbstractClientTest { createClientMappersPage.form().save(); assertAlertDanger(); } -} \ No newline at end of file +} diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientMappersSAMLTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientMappersSAMLTest.java index c822c232a2..7905bbd22c 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientMappersSAMLTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientMappersSAMLTest.java @@ -29,8 +29,6 @@ import static org.junit.Assert.*; import org.junit.Before; import org.keycloak.representations.idm.ClientRepresentation; import org.keycloak.representations.idm.ProtocolMapperRepresentation; -import static org.keycloak.testsuite.auth.page.login.Login.SAML; -import static org.keycloak.testsuite.console.clients.AbstractClientTest.createClientRep; import org.keycloak.testsuite.console.page.clients.mappers.ClientMapper; import org.keycloak.testsuite.console.page.clients.mappers.ClientMappers; import org.keycloak.testsuite.console.page.clients.mappers.CreateClientMappers; @@ -54,7 +52,7 @@ public class ClientMappersSAMLTest extends AbstractClientTest { @Before public void beforeClientMappersTest() { - ClientRepresentation newClient = createClientRep(TEST_CLIENT_ID, SAML); + ClientRepresentation newClient = createSamlClientRep(TEST_CLIENT_ID); testRealmResource().clients().create(newClient).close(); id = findClientByClientId(TEST_CLIENT_ID).getId(); @@ -211,4 +209,4 @@ public class ClientMappersSAMLTest extends AbstractClientTest { assertEquals(1, config.size()); assertEquals("offline_access", config.get("role")); } -} \ No newline at end of file +} diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientRolesTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientRolesTest.java index 64304d0ac0..92d144ca5a 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientRolesTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientRolesTest.java @@ -9,8 +9,7 @@ import static org.junit.Assert.*; import org.junit.Before; import org.keycloak.representations.idm.ClientRepresentation; import org.keycloak.representations.idm.RoleRepresentation; -import static org.keycloak.testsuite.auth.page.login.Login.OIDC; -import static org.keycloak.testsuite.console.clients.AbstractClientTest.createClientRep; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType.CONFIDENTIAL; import org.keycloak.testsuite.console.page.clients.roles.ClientRole; import org.keycloak.testsuite.console.page.clients.roles.ClientRoles; import org.keycloak.testsuite.console.page.clients.roles.CreateClientRole; @@ -40,7 +39,7 @@ public class ClientRolesTest extends AbstractClientTest { @Before public void beforeClientRolesTest() { - ClientRepresentation newClient = createClientRep(TEST_CLIENT_ID, OIDC); + ClientRepresentation newClient = createOidcClientRep(CONFIDENTIAL, TEST_CLIENT_ID, TEST_REDIRECT_URIS); testRealmResource().clients().create(newClient).close(); id = findClientByClientId(TEST_CLIENT_ID).getId(); @@ -296,4 +295,4 @@ public class ClientRolesTest extends AbstractClientTest { // assertTrue(flashMessage.getText(), flashMessage.isSuccess()); // assertNull(clients.findClient(newClient.getClientId())); // } -} \ No newline at end of file +} diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientScopeTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientScopeTest.java index 69509f20ec..da68ca31b6 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientScopeTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientScopeTest.java @@ -26,13 +26,13 @@ import java.util.Map; import org.jboss.arquillian.graphene.page.Page; import static org.junit.Assert.*; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.keycloak.representations.idm.ClientMappingsRepresentation; import org.keycloak.representations.idm.ClientRepresentation; import org.keycloak.representations.idm.MappingsRepresentation; import org.keycloak.representations.idm.RoleRepresentation; -import static org.keycloak.testsuite.auth.page.login.Login.OIDC; +import static org.keycloak.testsuite.console.clients.AbstractClientTest.createOidcClientRep; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType.CONFIDENTIAL; import org.keycloak.testsuite.console.page.clients.scope.ClientScope; /** @@ -49,7 +49,7 @@ public class ClientScopeTest extends AbstractClientTest { @Before public void before() { - newClient = createClientRep(TEST_CLIENT_ID, OIDC); + newClient = createOidcClientRep(CONFIDENTIAL, TEST_CLIENT_ID, TEST_REDIRECT_URIS); testRealmResource().clients().create(newClient).close(); found = findClientByClientId(TEST_CLIENT_ID); @@ -59,7 +59,6 @@ public class ClientScopeTest extends AbstractClientTest { } @Test - @Ignore //phantomjs sometimes doens't enable "Add Selected >>" button when role is selected public void clientScopeTest() { assertTrue(found.isFullScopeAllowed()); clientScopePage.scopeForm().setFullScopeAllowed(false); @@ -70,11 +69,11 @@ public class ClientScopeTest extends AbstractClientTest { assertNull(getAllMappingsRepresentation().getRealmMappings()); assertNull(getAllMappingsRepresentation().getClientMappings()); - clientScopePage.roleForm().addRealmRole("offline_access");//fails with phantomjs + clientScopePage.roleForm().addRealmRole("offline_access"); assertAlertSuccess(); clientScopePage.roleForm().selectClientRole("account"); - clientScopePage.roleForm().addClientRole("view-profile");//fails with phantomjs + clientScopePage.roleForm().addClientRole("view-profile"); assertAlertSuccess(); found = findClientByClientId(TEST_CLIENT_ID); @@ -85,16 +84,16 @@ public class ClientScopeTest extends AbstractClientTest { assertEquals(1, clientMappings.size()); assertEquals("view-profile", clientMappings.get("account").getMappings().get(0).getName()); - clientScopePage.roleForm().removeAssignedRole("offline_access"); - assertAlertSuccess();//fails with phantomjs - clientScopePage.roleForm().removeAssignedClientRole("view-profile"); - assertAlertSuccess();//fails with phantomjs - - assertNull(getAllMappingsRepresentation().getRealmMappings()); - assertNull(getAllMappingsRepresentation().getClientMappings()); +// clientScopePage.roleForm().removeAssignedRole("offline_access"); +// assertAlertSuccess();//fails with phantomjs +// clientScopePage.roleForm().removeAssignedClientRole("view-profile"); +// assertAlertSuccess();//fails with phantomjs +// +// assertNull(getAllMappingsRepresentation().getRealmMappings()); +// assertNull(getAllMappingsRepresentation().getClientMappings()); } private MappingsRepresentation getAllMappingsRepresentation() { return testRealmResource().clients().get(found.getId()).getScopeMappings().getAll(); } -} \ No newline at end of file +} diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientSettingsTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientSettingsTest.java index 8090475451..557a2dbef8 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientSettingsTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientSettingsTest.java @@ -18,9 +18,7 @@ package org.keycloak.testsuite.console.clients; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import javax.ws.rs.core.Response; import org.jboss.arquillian.graphene.page.Page; import static org.junit.Assert.*; @@ -28,12 +26,8 @@ import org.junit.Test; import org.keycloak.representations.idm.ClientRepresentation; import static org.keycloak.testsuite.admin.ApiUtil.getCreatedId; -import static org.keycloak.testsuite.auth.page.login.Login.OIDC; -import static org.keycloak.testsuite.auth.page.login.Login.SAML; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType.*; import org.keycloak.testsuite.console.page.clients.settings.ClientSettings; -import static org.keycloak.testsuite.console.page.clients.settings.ClientSettingsForm.OidcAccessType.BEARER_ONLY; -import static org.keycloak.testsuite.console.page.clients.settings.ClientSettingsForm.OidcAccessType.CONFIDENTIAL; -import static org.keycloak.testsuite.console.page.clients.settings.ClientSettingsForm.SAMLClientSettingsForm.*; import static org.keycloak.testsuite.util.WaitUtils.pause; import org.keycloak.testsuite.util.Timer; @@ -51,17 +45,20 @@ public class ClientSettingsTest extends AbstractClientTest { private ClientRepresentation newClient; @Test - public void crudOIDCPublic() { - newClient = createClientRep("oidc-public", OIDC); + public void crudOIDCConfidential() { + newClient = createOidcClientRep(CONFIDENTIAL, "oidc-confidential", TEST_REDIRECT_URIS); createClient(newClient); + assertAlertSuccess(); + //setExpectedWebOrigins(newClient); + // read & verify ClientRepresentation found = findClientByClientId(newClient.getClientId()); assertNotNull("Client " + newClient.getClientId() + " was not found.", found); assertClientSettingsEqual(newClient, found); // update & verify - newClient.setClientId("oidc-public-updated"); + newClient.setClientId("oidc-confidential-updated"); newClient.setName("updatedName"); List redirectUris = new ArrayList<>(); @@ -76,7 +73,7 @@ public class ClientSettingsTest extends AbstractClientTest { webOrigins.add("http://example3.test"); newClient.setWebOrigins(webOrigins); - clientSettingsPage.form().setClientId("oidc-public-updated"); + clientSettingsPage.form().setClientId("oidc-confidential-updated"); clientSettingsPage.form().setName("updatedName"); clientSettingsPage.form().setRedirectUris(redirectUris); clientSettingsPage.form().setWebOrigins(webOrigins); @@ -95,43 +92,36 @@ public class ClientSettingsTest extends AbstractClientTest { } @Test - public void createOIDCConfidential() { - newClient = createClientRep("oidc-confidetial", OIDC); + public void createOIDCPublic() { + newClient = createOidcClientRep(PUBLIC, "oidc-public", TEST_REDIRECT_URIS); createClient(newClient); - - newClient.setRedirectUris(TEST_REDIRECT_URIs); - newClient.setPublicClient(false); - - clientSettingsPage.form().setAccessType(CONFIDENTIAL); - clientSettingsPage.form().setRedirectUris(TEST_REDIRECT_URIs); - clientSettingsPage.form().save(); + assertAlertSuccess(); + //setExpectedWebOrigins(newClient); + ClientRepresentation found = findClientByClientId(newClient.getClientId()); assertNotNull("Client " + newClient.getClientId() + " was not found.", found); assertClientSettingsEqual(newClient, found); } @Test - public void saveOIDCConfidentialWithoutRedirectURIs() { - newClient = createClientRep("oidc-confidential", OIDC); + public void createOIDCPublicWithoutRedirectURIs() { + newClient = createOidcClientRep(PUBLIC, "oidc-public"); + newClient.setStandardFlowEnabled(false); createClient(newClient); + assertAlertSuccess(); - clientSettingsPage.form().setName("name"); - clientSettingsPage.form().save(); - assertAlertDanger(); + ClientRepresentation found = findClientByClientId(newClient.getClientId()); + assertNotNull("Client " + newClient.getClientId() + " was not found.", found); + assertClientSettingsEqual(newClient, found); } @Test public void createOIDCBearerOnly() { - newClient = createClientRep("oidc-bearer-only", OIDC); + newClient = createOidcClientRep(BEARER_ONLY, "oidc-bearer-only"); createClient(newClient); + assertAlertSuccess(); - clientSettingsPage.form().setAccessType(BEARER_ONLY); - clientSettingsPage.form().save(); - - newClient.setBearerOnly(true); - newClient.setPublicClient(false); - ClientRepresentation found = findClientByClientId(newClient.getClientId()); assertNotNull("Client " + newClient.getClientId() + " was not found.", found); assertClientSettingsEqual(newClient, found); @@ -139,10 +129,12 @@ public class ClientSettingsTest extends AbstractClientTest { @Test public void createSAML() { - newClient = createClientRep("saml", SAML); + newClient = createSamlClientRep("saml"); createClient(newClient); + assertAlertSuccess(); ClientRepresentation found = findClientByClientId(newClient.getClientId()); + System.out.println("...." + found.isFrontchannelLogout()); assertNotNull("Client " + newClient.getClientId() + " was not found.", found); assertClientSettingsEqual(newClient, found); assertClientSamlAttributes(getSAMLAttributes(), found.getAttributes()); @@ -153,22 +145,27 @@ public class ClientSettingsTest extends AbstractClientTest { clientsPage.table().createClient(); createClientPage.form().save(); assertAlertDanger(); - - clientsPage.navigateTo(); - newClient = createClientRep(TEST_CLIENT_ID, OIDC); - createClient(newClient); - - clientsPage.navigateTo(); - clientsPage.table().createClient(); - createClientPage.form().setClientId(TEST_CLIENT_ID); - createClientPage.form().save(); - assertAlertDanger(); + } + +// @Test + public void createInconsistentClient() { + ClientRepresentation c = createOidcClientRep(CONFIDENTIAL, "inconsistent_client"); + c.setPublicClient(true); + c.setBearerOnly(true); + + Response r = clientsResource().create(c); + r.close(); + clientSettingsPage.setId(getCreatedId(r)); + + c = clientResource(clientSettingsPage.getId()).toRepresentation(); + assertTrue(c.isBearerOnly()); + assertTrue(c.isPublicClient()); } public void createClients(String clientIdPrefix, int count) { for (int i = 0; i < count; i++) { String clientId = String.format("%s%02d", clientIdPrefix, i); - ClientRepresentation cr = createClientRep(clientId, OIDC); + ClientRepresentation cr = createOidcClientRep(CONFIDENTIAL, clientId, "http://example.test/*"); Timer.DEFAULT.reset(); Response r = testRealmResource().clients().create(cr); r.close(); @@ -185,11 +182,11 @@ public class ClientSettingsTest extends AbstractClientTest { @Test public void disabledClient() { - newClient = createClientRep("disabled-client", OIDC); + newClient = createOidcClientRep(CONFIDENTIAL, "disabled-client"); newClient.setEnabled(false); createClient(newClient); ClientRepresentation clientRepre = findClientByClientId("disabled-client"); assertTrue("Client should be disabled", clientRepre.isEnabled()); } -} \ No newline at end of file +} diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientsTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientsTest.java index c45e40f748..d9e64a7ac7 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientsTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/clients/ClientsTest.java @@ -26,11 +26,9 @@ import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; import org.keycloak.representations.idm.ClientRepresentation; -import static org.keycloak.testsuite.auth.page.login.Login.OIDC; -import static org.keycloak.testsuite.console.clients.AbstractClientTest.createClientRep; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType.CONFIDENTIAL; import org.keycloak.testsuite.console.page.clients.settings.ClientSettings; import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlEquals; -import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlEquals; /** * @@ -45,7 +43,7 @@ public class ClientsTest extends AbstractClientTest { @Before public void beforeClientsTest() { - newClient = createClientRep(TEST_CLIENT_ID, OIDC); + newClient = createOidcClientRep(CONFIDENTIAL, TEST_CLIENT_ID, TEST_REDIRECT_URIS); testRealmResource().clients().create(newClient).close(); ClientRepresentation found = findClientByClientId(TEST_CLIENT_ID); @@ -73,4 +71,4 @@ public class ClientsTest extends AbstractClientTest { ClientRepresentation found = findClientByClientId(TEST_CLIENT_ID); assertNull("Deleted client " + TEST_CLIENT_ID + " was found.", found); } -} \ No newline at end of file +} diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/events/AdminEventsTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/events/AdminEventsTest.java index 59901026b7..ddbaa8cf9c 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/events/AdminEventsTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/events/AdminEventsTest.java @@ -1,24 +1,3 @@ -/* - * JBoss, Home of Professional Open Source. - * Copyright 2012, Red Hat, Inc., and individual contributors - * as indicated by the @author tags. See the copyright.txt file in the - * distribution for a full listing of individual contributors. - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of - * the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this software; if not, write to the Free - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA, or see the FSF site: http://www.fsf.org. - */ package org.keycloak.testsuite.console.events; import org.jboss.arquillian.graphene.page.Page; @@ -28,6 +7,7 @@ import org.keycloak.representations.idm.ClientRepresentation; import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.testsuite.admin.ApiUtil; import org.keycloak.testsuite.console.AbstractConsoleTest; +import org.keycloak.testsuite.console.clients.AbstractClientTest; import org.keycloak.testsuite.console.page.clients.Clients; import org.keycloak.testsuite.console.page.events.AdminEvents; import org.keycloak.testsuite.console.page.events.Config; @@ -39,8 +19,7 @@ import java.util.List; import static org.junit.Assert.assertEquals; import org.keycloak.admin.client.resource.ClientsResource; -import static org.keycloak.testsuite.auth.page.login.Login.OIDC; -import static org.keycloak.testsuite.console.clients.AbstractClientTest.createClientRep; +import static org.keycloak.testsuite.console.page.clients.CreateClientForm.OidcAccessType.CONFIDENTIAL; /** @@ -71,7 +50,7 @@ public class AdminEventsTest extends AbstractConsoleTest { @Test public void clientsAdminEventsTest() { - newClient = createClientRep("test_client", OIDC); + newClient = AbstractClientTest.createOidcClientRep(CONFIDENTIAL, "test_client", "http://example.test/test_client/*"); Response response = clientsResource().create(newClient); String id = ApiUtil.getCreatedId(response); response.close(); @@ -111,4 +90,4 @@ public class AdminEventsTest extends AbstractConsoleTest { public ClientsResource clientsResource() { return testRealmResource().clients(); } -} \ No newline at end of file +} diff --git a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/federation/LdapUserFederationTest.java b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/federation/LdapUserFederationTest.java index fa57cdf5ec..d0d2a2731a 100644 --- a/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/federation/LdapUserFederationTest.java +++ b/testsuite/integration-arquillian/tests/other/console/src/test/java/org/keycloak/testsuite/console/federation/LdapUserFederationTest.java @@ -133,7 +133,7 @@ public class LdapUserFederationTest extends AbstractConsoleTest { @Test public void testConnection() throws Exception { createLdapUserProvider.navigateTo(); - createLdapUserProvider.form().selectVendor(1); + createLdapUserProvider.form().selectVendor("Other"); createLdapUserProvider.form().setConsoleDisplayNameInput("ldap"); createLdapUserProvider.form().selectEditMode(WRITABLE); createLdapUserProvider.form().setLdapConnectionUrlInput("ldap://localhost:10389"); diff --git a/testsuite/integration-arquillian/tests/other/console_no_users/pom.xml b/testsuite/integration-arquillian/tests/other/console_no_users/pom.xml index 0ae2e64fdb..9b70e76c12 100644 --- a/testsuite/integration-arquillian/tests/other/console_no_users/pom.xml +++ b/testsuite/integration-arquillian/tests/other/console_no_users/pom.xml @@ -34,7 +34,6 @@ - org.apache.maven.plugins maven-resources-plugin diff --git a/testsuite/integration-arquillian/tests/other/jpa-performance/src/test/java/org/keycloak/testsuite/user/ManyUsersTest.java b/testsuite/integration-arquillian/tests/other/jpa-performance/src/test/java/org/keycloak/testsuite/user/ManyUsersTest.java index f882879269..914f748555 100644 --- a/testsuite/integration-arquillian/tests/other/jpa-performance/src/test/java/org/keycloak/testsuite/user/ManyUsersTest.java +++ b/testsuite/integration-arquillian/tests/other/jpa-performance/src/test/java/org/keycloak/testsuite/user/ManyUsersTest.java @@ -66,7 +66,9 @@ public class ManyUsersTest extends AbstractUserTest { } realmTimer.reset("create realm before test"); - createRealm(REALM); + RealmRepresentation realm = new RealmRepresentation(); + realm.setRealm(REALM); + realmsResouce().create(realm); refreshToken(); } diff --git a/testsuite/integration-arquillian/tests/other/jpa-performance/src/test/resources/log4j.properties b/testsuite/integration-arquillian/tests/other/jpa-performance/src/test/resources/log4j.properties deleted file mode 100644 index 979584600b..0000000000 --- a/testsuite/integration-arquillian/tests/other/jpa-performance/src/test/resources/log4j.properties +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright 2016 Red Hat, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -log4j.rootLogger=info - -log4j.appender.keycloak=org.apache.log4j.ConsoleAppender -log4j.appender.keycloak.layout=org.apache.log4j.PatternLayout -log4j.appender.keycloak.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%c] %m%n - -log4j.appender.testsuite=org.apache.log4j.ConsoleAppender -log4j.appender.testsuite.layout=org.apache.log4j.PatternLayout -log4j.appender.testsuite.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %m%n - -log4j.logger.org.keycloak=off, keycloak - -log4j.logger.org.keycloak.testsuite=debug, testsuite -log4j.additivity.org.keycloak.testsuite=false - -# Enable to view events -# log4j.logger.org.keycloak.events=debug - -# Enable to view loaded SPI and Providers -# log4j.logger.org.keycloak.services.DefaultKeycloakSessionFactory=debug -# log4j.logger.org.keycloak.provider.ProviderManager=debug -# log4j.logger.org.keycloak.provider.FileSystemProviderLoaderFactory=debug - -# Liquibase updates logged with "info" by default. Logging level can be changed by system property "keycloak.liquibase.logging.level" -keycloak.liquibase.logging.level=info -log4j.logger.org.keycloak.connections.jpa.updater.liquibase=${keycloak.liquibase.logging.level} -log4j.logger.org.keycloak.connections.jpa=debug - -# Enable to view database updates -# log4j.logger.org.keycloak.connections.mongo.updater.DefaultMongoUpdaterProvider=debug -# log4j.logger.org.keycloak.connections.jpa.DefaultJpaConnectionProviderFactory=debug -# log4j.logger.org.keycloak.migration.MigrationModelManager=debug - -# Enable to view kerberos/spnego logging -# log4j.logger.org.keycloak.broker.kerberos=trace - -# Enable to view detailed AS REQ and TGS REQ requests to embedded Kerberos server -# log4j.logger.org.apache.directory.server.kerberos=debug - -log4j.logger.org.xnio=off -log4j.logger.org.hibernate=off -log4j.logger.org.jboss.resteasy=warn -log4j.logger.org.apache.directory.api=warn -log4j.logger.org.apache.directory.server.core=warn \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/pom.xml b/testsuite/integration-arquillian/tests/other/pom.xml index 092e105fde..dadd13ef39 100644 --- a/testsuite/integration-arquillian/tests/other/pom.xml +++ b/testsuite/integration-arquillian/tests/other/pom.xml @@ -44,7 +44,6 @@ - org.apache.maven.plugins maven-dependency-plugin @@ -68,7 +67,6 @@ - org.apache.maven.plugins maven-resources-plugin @@ -78,7 +76,7 @@ copy-resources - ${jboss.server.config.dir} + ${auth.server.config.dir} ${project.build.directory}/dependency @@ -92,15 +90,6 @@ - - org.apache.maven.plugins - maven-surefire-plugin - - - ${project.build.directory}/dependency/arquillian.xml - - - diff --git a/testsuite/integration-arquillian/tests/pom.xml b/testsuite/integration-arquillian/tests/pom.xml index f77d369472..015f5336dc 100644 --- a/testsuite/integration-arquillian/tests/pom.xml +++ b/testsuite/integration-arquillian/tests/pom.xml @@ -33,125 +33,81 @@ Tests - - base other - ${project.build.directory}/containers - ${project.build.directory}/examples - ${project.build.directory}/undertow-configuration + undertow + true - auth-server-undertow + auth-server-${auth.server} + ${containers.home}/${auth.server.container} + ${auth.server.home} + 100 8180 8543 10090 10099 false - 60 + 60 + -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m + + integration-arquillian-servers-auth-server-${auth.server} + ${auth.server.undertow} + 300 + + ${project.build.directory}/examples + phantomjs /usr/bin/firefox - 1.1.11.Final - 2.52.0 - 2.0.0.Beta1 - 2.1.0.Alpha3 - 8.2.0.Final - 2.2.2 - true true - - ${java.home} - - test-constants.properties - - - - - org.jboss.arquillian.selenium - selenium-bom - ${selenium.version} - pom - import - - - org.jboss.arquillian - arquillian-bom - ${arquillian-core.version} - pom - import - - - org.jboss.arquillian.extension - arquillian-drone-bom - ${arquillian-drone.version} - pom - import - - - org.wildfly - wildfly-arquillian-container-managed - ${arquillian-wildfly-container.version} - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - ${project.build.directory} - ${browser} - ${firefox_binary} - false - ${auth.server.container} - true - ${auth.server.port.offset} - ${auth.server.http.port} - ${auth.server.https.port} - ${auth.server.management.port} - ${auth.server.management.port.jmx} - ${auth.server.ssl.required} - ${auth.server.java.home} - ${startup.timeout.sec} - ${jboss.server.config.dir} - ${frontend.console.output} - ${backend.console.output} - ${testsuite.constants} - - - - listener - org.keycloak.testsuite.util.TestEventsLogger - - - false - + maven-dependency-plugin + + + unpack-auth-server-jboss + generate-resources + + unpack + + + + + org.keycloak.testsuite + ${auth.server.jboss.artifactId} + ${project.version} + zip + + + ${containers.home} + true + ${auth.server.jboss.skip.unpack} + + + - org.apache.maven.plugins maven-resources-plugin copy-admin-user-json-file - process-resources + generate-resources copy-resources - ${jboss.server.config.dir} + ${auth.server.config.dir} src/test/resources @@ -165,12 +121,464 @@ + + maven-surefire-plugin + + + ${project.build.directory} + ${project.build.directory}/dependency/arquillian.xml + + ${auth.server} + ${auth.server.container} + + ${auth.server.undertow} + ${auth.server.jboss} + ${auth.server.memory.settings} + + ${auth.server.home} + ${auth.server.java.home} + + ${auth.server.port.offset} + ${auth.server.http.port} + ${auth.server.https.port} + ${auth.server.management.port} + ${auth.server.management.port.jmx} + ${auth.server.ssl.required} + ${auth.server.jboss.startup.timeout} + ${auth.server.config.dir} + ${frontend.console.output} + ${backend.console.output} + + ${adapter.test.props} + + ${browser} + ${firefox_binary} + + + + + listener + org.keycloak.testsuite.util.TestEventsLogger + + + false + + + + auth-server-wildfly + + wildfly + true + false + ${auth.server.home}/standalone/configuration + 1.3.173 + + + + org.wildfly + wildfly-arquillian-container-managed + + + + + + auth-server-eap + + eap + true + false + ${auth.server.home}/standalone/configuration + 1.3.173 + + + + org.wildfly + wildfly-arquillian-container-managed + + + + + + auth-server-cluster + + + - + + ${containers.home}/auth-server-balancer-wildfly + ${containers.home}/auth-server-${auth.server}-backend1 + ${containers.home}/auth-server-${auth.server}-backend2 + + ${auth.server.backend1.home}/standalone/configuration + + + + + maven-enforcer-plugin + + + + enforce + + + + + + auth.server + (wildfly)|(eap) + Profile "auth-server-cluster" requires activation of profile "auth-server-wildfly" or "auth-server-eap". + + + + + + + + maven-antrun-plugin + + + + + + maven-dependency-plugin + + + unpack-auth-server-load-balancer + generate-resources + + unpack + + + + + org.keycloak.testsuite + integration-arquillian-server-wildfly-balancer + ${project.version} + zip + ${auth.server.balancer.home} + + + true + + + + + + maven-antrun-plugin + + + copy-auth-server-backend-nodes + process-resources + + run + + + + + + + + + + + + + + + + + + + maven-surefire-plugin + + + true + + false + true + + ${auth.server.balancer.home} + ${auth.server.backend1.home} + ${auth.server.backend2.home} + + + 101 + 102 + + 8181 + 8182 + + 8544 + 8545 + + 10091 + 10092 + + 10100 + 10101 + + + + + + + + + + + clean-jpa + + + + + org.liquibase + liquibase-maven-plugin + + META-INF/jpa-changelog-master.xml + + ${keycloak.connectionsJpa.url} + ${keycloak.connectionsJpa.driver} + ${keycloak.connectionsJpa.user} + ${keycloak.connectionsJpa.password} + + false + ${keycloak.connectionsJpa.liquibaseDatabaseClass} + + + + clean-jpa + clean + + dropAll + + + + + + + + + + + + + migration + + + migrated.auth.server.version + + + + + - + + + + + maven-enforcer-plugin + + + enforce-properties + + enforce + + + + + migrated.auth.server.version + + + + + + + + maven-dependency-plugin + + + unpack-migrated-auth-server-jboss + generate-resources + + unpack + + + + + org.keycloak.testsuite + ${migrated.auth.server.jboss.artifactId} + ${project.version} + zip + + + ${containers.home} + true + + + + + + maven-surefire-plugin + + + ${migrated.auth.server.version} + + + + + + + + + migration-kc16 + + + migrated.auth.server.version + 1.6.1.Final + + + + integration-arquillian-server-wildfly-kc16 + + + + + + maven-surefire-plugin + + + true + ${containers.home}/keycloak-${migrated.auth.server.version} + src/test/resources/migration-test/migration-realm-16.json + + + + + + + + + + migration-kc15 + + + migrated.auth.server.version + 1.5.1.Final + + + + integration-arquillian-server-wildfly-kc15 + + + + + + maven-surefire-plugin + + + true + ${containers.home}/keycloak-${migrated.auth.server.version} + src/test/resources/migration-test/migration-realm-15.json + + + + + + + + + + migration-kc14 + + + migrated.auth.server.version + 1.4.0.Final + + + + integration-arquillian-server-wildfly-kc14 + + + + + + maven-surefire-plugin + + + true + ${containers.home}/keycloak-${migrated.auth.server.version} + + + + + + + + + + migration-kc13 + + + migrated.auth.server.version + 1.3.1.Final + + + + integration-arquillian-server-wildfly-kc13 + + + + + + maven-surefire-plugin + + + true + ${containers.home}/keycloak-${migrated.auth.server.version} + + + + + + + + + + migration-kc12 + + + migrated.auth.server.version + 1.2.0.Final + + + + integration-arquillian-server-wildfly-kc12 + + + + + + maven-surefire-plugin + + + true + ${containers.home}/keycloak-${migrated.auth.server.version} + + + + + + + + + + + no-account @@ -195,7 +603,7 @@ common-test-dependencies - src + src/test @@ -274,6 +682,12 @@ jar + + com.h2database + h2 + compile + + com.icegreen @@ -319,9 +733,14 @@ keycloak-adapter-spi + - - + + org.keycloak.testsuite + integration-arquillian-servers-auth-server-undertow + ${project.version} + + org.jboss.arquillian.container undertow-embedded @@ -388,11 +807,6 @@ org.hibernate.javax.persistence hibernate-jpa-2.1-api - - com.h2database - h2 - compile - org.hibernate hibernate-entitymanager @@ -424,16 +838,14 @@ postgresql ${postgresql.version} - + - org.apache.maven.plugins maven-surefire-plugin - org.apache.maven.plugins maven-dependency-plugin @@ -447,629 +859,7 @@ - - - clean-jpa - - - - - org.liquibase - liquibase-maven-plugin - - META-INF/jpa-changelog-master.xml - - ${keycloak.connectionsJpa.url} - ${keycloak.connectionsJpa.driver} - ${keycloak.connectionsJpa.user} - ${keycloak.connectionsJpa.password} - - false - ${keycloak.connectionsJpa.liquibaseDatabaseClass} - - - - clean-jpa - clean - - dropAll - - - - - - - - - - - auth-server-wildfly - - auth-server-wildfly - 300 - - ${containers.home}/keycloak-${project.version} - ${keycloak.home}/standalone/configuration - 1.3.173 - - - - org.wildfly - wildfly-arquillian-container-managed - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - false - ${keycloak.home} - ${adapter.test.props} - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-auth-server-wildfly - generate-test-resources - - unpack - - - - - org.keycloak.testsuite - integration-arquillian-server-wildfly - ${project.version} - zip - - - ${containers.home} - true - - - - - - - - - - - - auth-server-wildfly-cluster - - - - - - auth-server-wildfly-cluster - 300 - - 1.3.173 - - ${containers.home}/balancer/wildfly-balancer-${project.version} - ${containers.home}/node1/keycloak-${project.version} - ${containers.home}/node2/keycloak-${project.version} - - ${keycloak.backend1.home} - ${keycloak.home}/standalone/configuration - - - - org.wildfly - wildfly-arquillian-container-managed - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - - true - false - ${adapter.test.props} - - ${keycloak.balancer.home} - ${keycloak.backend1.home} - ${keycloak.backend2.home} - - - 101 - 102 - - 8181 - 8182 - - 8544 - 8545 - - 10091 - 10092 - - 10100 - 10101 - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-auth-server-wildfly - generate-test-resources - - unpack - - - - - org.keycloak.testsuite - integration-arquillian-server-wildfly-balancer - ${project.version} - zip - ${containers.home}/balancer - - - org.keycloak.testsuite - integration-arquillian-server-wildfly - ${project.version} - zip - ${containers.home}/node1 - - - org.keycloak.testsuite - integration-arquillian-server-wildfly - ${project.version} - zip - ${containers.home}/node2 - - - true - - - - - - - - - - - - auth-server-eap7 - - auth-server-eap7 - 300 - - ${containers.home}/keycloak-${version.server.dist} - ${keycloak.home}/standalone/configuration - - - - org.wildfly - wildfly-arquillian-container-managed - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-properties - - enforce - - - - - version.server.dist - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - false - ${keycloak.home} - ${adapter.test.props} - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-auth-server-eap - generate-test-resources - - unpack - - - - - org.keycloak.testsuite - integration-arquillian-server-eap7 - ${project.version} - zip - - - ${containers.home} - true - - - - - - - - - - - auth-server-eap7-cluster - - - - - - auth-server-eap7-cluster - 300 - - 1.3.173 - - ${containers.home}/balancer/wildfly-balancer-${project.version} - ${containers.home}/node1/keycloak-${version.server.dist} - ${containers.home}/node2/keycloak-${version.server.dist} - - ${keycloak.backend1.home} - ${keycloak.home}/standalone/configuration - - - - org.wildfly - wildfly-arquillian-container-managed - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-properties - - enforce - - - - - version.server.dist - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - - true - false - ${adapter.test.props} - - ${keycloak.balancer.home} - ${keycloak.backend1.home} - ${keycloak.backend2.home} - - - 101 - 102 - - 8181 - 8182 - - 8544 - 8545 - - 10091 - 10092 - - 10100 - 10101 - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-auth-server-wildfly - generate-test-resources - - unpack - - - - - org.keycloak.testsuite - integration-arquillian-server-wildfly-balancer - ${project.version} - zip - ${containers.home}/balancer - - - org.keycloak.testsuite - integration-arquillian-server-eap7 - ${project.version} - zip - ${containers.home}/node1 - - - org.keycloak.testsuite - integration-arquillian-server-eap7 - ${project.version} - zip - ${containers.home}/node2 - - - true - - - - - - - - - - - - - migration - - - migrated.auth.server.version - - - - - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-properties - - enforce - - - - - migrated.auth.server.version - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-migrated-auth-server-wildfly - generate-test-resources - - unpack - - - - - org.keycloak.testsuite - ${migrated.auth.server.artifactId} - ${project.version} - zip - - - ${containers.home} - true - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - ${migrated.auth.server.version} - - - - - - - - - migration-kc16 - - - migrated.auth.server.version - 1.6.1.Final - - - - integration-arquillian-server-wildfly-kc16 - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - ${containers.home}/keycloak-${migrated.auth.server.version} - src/test/resources/migration-test/migration-realm-16.json - - - - - - - - - - migration-kc15 - - - migrated.auth.server.version - 1.5.1.Final - - - - integration-arquillian-server-wildfly-kc15 - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - ${containers.home}/keycloak-${migrated.auth.server.version} - src/test/resources/migration-test/migration-realm-15.json - - - - - - - - - - migration-kc14 - - - migrated.auth.server.version - 1.4.0.Final - - - - integration-arquillian-server-wildfly-kc14 - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - ${containers.home}/keycloak-${migrated.auth.server.version} - - - - - - - - - - migration-kc13 - - - migrated.auth.server.version - 1.3.1.Final - - - - integration-arquillian-server-wildfly-kc13 - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - ${containers.home}/keycloak-${migrated.auth.server.version} - - - - - - - - - - migration-kc12 - - - migrated.auth.server.version - 1.2.0.Final - - - - integration-arquillian-server-wildfly-kc12 - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - true - ${containers.home}/keycloak-${migrated.auth.server.version} - - - - - - - - + From c9545e16f71b8aa2b975860543f3ed269ade92bc Mon Sep 17 00:00:00 2001 From: mposolda Date: Thu, 24 Mar 2016 15:29:55 +0100 Subject: [PATCH 2/2] KEYCLOAK-2713 Fix error at startup --- .../DefaultJpaConnectionProviderFactory.java | 3 +-- .../jpa/HibernateStatsReporter.java | 2 +- .../org/keycloak/timer}/ScheduledTask.java | 2 +- .../org/keycloak/timer/TimerProvider.java | 4 +++- .../scheduled/ClearExpiredEvents.java | 1 + .../scheduled/ClearExpiredUserSessions.java | 1 + .../ClusterAwareScheduledTaskRunner.java | 1 + .../scheduled/ScheduledTaskRunner.java | 5 +---- .../timer/basic/BasicTimerProvider.java | 19 +++++++++++++++---- .../basic/BasicTimerProviderFactory.java | 2 +- 10 files changed, 26 insertions(+), 14 deletions(-) rename {services/src/main/java/org/keycloak/services/scheduled => server-spi/src/main/java/org/keycloak/timer}/ScheduledTask.java (95%) diff --git a/model/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java b/model/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java index 25401f6c13..cd7c6e3477 100755 --- a/model/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java +++ b/model/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java @@ -40,7 +40,6 @@ import org.keycloak.connections.jpa.util.JpaUtils; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.provider.ServerInfoAwareProviderFactory; -import org.keycloak.services.scheduled.ScheduledTaskRunner; import org.keycloak.timer.TimerProvider; /** @@ -274,7 +273,7 @@ public class DefaultJpaConnectionProviderFactory implements JpaConnectionProvide protected void startGlobalStats(KeycloakSession session, int globalStatsIntervalSecs) { logger.debugf("Started Hibernate statistics with the interval %s seconds", globalStatsIntervalSecs); TimerProvider timer = session.getProvider(TimerProvider.class); - timer.schedule(new ScheduledTaskRunner(session.getKeycloakSessionFactory(), new HibernateStatsReporter(emf)), globalStatsIntervalSecs * 1000, "ReportHibernateGlobalStats"); + timer.scheduleTask(new HibernateStatsReporter(emf), globalStatsIntervalSecs * 1000, "ReportHibernateGlobalStats"); } diff --git a/model/jpa/src/main/java/org/keycloak/connections/jpa/HibernateStatsReporter.java b/model/jpa/src/main/java/org/keycloak/connections/jpa/HibernateStatsReporter.java index 349bd40ab5..116aaaef90 100644 --- a/model/jpa/src/main/java/org/keycloak/connections/jpa/HibernateStatsReporter.java +++ b/model/jpa/src/main/java/org/keycloak/connections/jpa/HibernateStatsReporter.java @@ -27,7 +27,7 @@ import org.hibernate.stat.QueryStatistics; import org.hibernate.stat.Statistics; import org.jboss.logging.Logger; import org.keycloak.models.KeycloakSession; -import org.keycloak.services.scheduled.ScheduledTask; +import org.keycloak.timer.ScheduledTask; /** * @author Marek Posolda diff --git a/services/src/main/java/org/keycloak/services/scheduled/ScheduledTask.java b/server-spi/src/main/java/org/keycloak/timer/ScheduledTask.java similarity index 95% rename from services/src/main/java/org/keycloak/services/scheduled/ScheduledTask.java rename to server-spi/src/main/java/org/keycloak/timer/ScheduledTask.java index 3446765744..ba092ac695 100644 --- a/services/src/main/java/org/keycloak/services/scheduled/ScheduledTask.java +++ b/server-spi/src/main/java/org/keycloak/timer/ScheduledTask.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.keycloak.services.scheduled; +package org.keycloak.timer; import org.keycloak.models.KeycloakSession; diff --git a/server-spi/src/main/java/org/keycloak/timer/TimerProvider.java b/server-spi/src/main/java/org/keycloak/timer/TimerProvider.java index 2963a679b7..5dbf69bff9 100644 --- a/server-spi/src/main/java/org/keycloak/timer/TimerProvider.java +++ b/server-spi/src/main/java/org/keycloak/timer/TimerProvider.java @@ -24,7 +24,9 @@ import org.keycloak.provider.Provider; */ public interface TimerProvider extends Provider { - public void schedule(Runnable runnable, long interval, String taskName); + public void schedule(Runnable runnable, long intervalMillis, String taskName); + + public void scheduleTask(ScheduledTask scheduledTask, long intervalMillis, String taskName); public void cancelTask(String taskName); diff --git a/services/src/main/java/org/keycloak/services/scheduled/ClearExpiredEvents.java b/services/src/main/java/org/keycloak/services/scheduled/ClearExpiredEvents.java index 2a854ddd3e..efef0f391c 100755 --- a/services/src/main/java/org/keycloak/services/scheduled/ClearExpiredEvents.java +++ b/services/src/main/java/org/keycloak/services/scheduled/ClearExpiredEvents.java @@ -20,6 +20,7 @@ package org.keycloak.services.scheduled; import org.keycloak.events.EventStoreProvider; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; +import org.keycloak.timer.ScheduledTask; /** * @author Stian Thorgersen diff --git a/services/src/main/java/org/keycloak/services/scheduled/ClearExpiredUserSessions.java b/services/src/main/java/org/keycloak/services/scheduled/ClearExpiredUserSessions.java index 06cc1ecfe4..5935eb08cb 100755 --- a/services/src/main/java/org/keycloak/services/scheduled/ClearExpiredUserSessions.java +++ b/services/src/main/java/org/keycloak/services/scheduled/ClearExpiredUserSessions.java @@ -20,6 +20,7 @@ package org.keycloak.services.scheduled; import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.UserSessionProvider; +import org.keycloak.timer.ScheduledTask; /** * @author Stian Thorgersen diff --git a/services/src/main/java/org/keycloak/services/scheduled/ClusterAwareScheduledTaskRunner.java b/services/src/main/java/org/keycloak/services/scheduled/ClusterAwareScheduledTaskRunner.java index 7f60891e33..94db9c971e 100644 --- a/services/src/main/java/org/keycloak/services/scheduled/ClusterAwareScheduledTaskRunner.java +++ b/services/src/main/java/org/keycloak/services/scheduled/ClusterAwareScheduledTaskRunner.java @@ -23,6 +23,7 @@ import org.keycloak.cluster.ClusterProvider; import org.keycloak.cluster.ExecutionResult; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; +import org.keycloak.timer.ScheduledTask; /** * Ensures that there are not concurrent executions of same task (either on this host or any other cluster host) diff --git a/services/src/main/java/org/keycloak/services/scheduled/ScheduledTaskRunner.java b/services/src/main/java/org/keycloak/services/scheduled/ScheduledTaskRunner.java index 33dc91aebd..b49300f8a1 100644 --- a/services/src/main/java/org/keycloak/services/scheduled/ScheduledTaskRunner.java +++ b/services/src/main/java/org/keycloak/services/scheduled/ScheduledTaskRunner.java @@ -17,13 +17,10 @@ package org.keycloak.services.scheduled; -import java.util.concurrent.Callable; - -import org.keycloak.cluster.ClusterProvider; -import org.keycloak.cluster.ExecutionResult; import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.services.ServicesLogger; +import org.keycloak.timer.ScheduledTask; /** * @author Stian Thorgersen diff --git a/services/src/main/java/org/keycloak/timer/basic/BasicTimerProvider.java b/services/src/main/java/org/keycloak/timer/basic/BasicTimerProvider.java index 5a58c88855..29a736f47d 100644 --- a/services/src/main/java/org/keycloak/timer/basic/BasicTimerProvider.java +++ b/services/src/main/java/org/keycloak/timer/basic/BasicTimerProvider.java @@ -18,6 +18,9 @@ package org.keycloak.timer.basic; import org.jboss.logging.Logger; +import org.keycloak.models.KeycloakSession; +import org.keycloak.services.scheduled.ScheduledTaskRunner; +import org.keycloak.timer.ScheduledTask; import org.keycloak.timer.TimerProvider; import java.util.Timer; @@ -30,16 +33,18 @@ public class BasicTimerProvider implements TimerProvider { private static final Logger logger = Logger.getLogger(BasicTimerProvider.class); + private final KeycloakSession session; private final Timer timer; private final BasicTimerProviderFactory factory; - public BasicTimerProvider(Timer timer, BasicTimerProviderFactory factory) { + public BasicTimerProvider(KeycloakSession session, Timer timer, BasicTimerProviderFactory factory) { + this.session = session; this.timer = timer; this.factory = factory; } @Override - public void schedule(final Runnable runnable, final long interval, String taskName) { + public void schedule(final Runnable runnable, final long intervalMillis, String taskName) { TimerTask task = new TimerTask() { @Override public void run() { @@ -53,8 +58,14 @@ public class BasicTimerProvider implements TimerProvider { existingTask.cancel(); } - logger.debugf("Starting task '%s' with interval '%d'", taskName, interval); - timer.schedule(task, interval, interval); + logger.debugf("Starting task '%s' with interval '%d'", taskName, intervalMillis); + timer.schedule(task, intervalMillis, intervalMillis); + } + + @Override + public void scheduleTask(ScheduledTask scheduledTask, long intervalMillis, String taskName) { + ScheduledTaskRunner scheduledTaskRunner = new ScheduledTaskRunner(session.getKeycloakSessionFactory(), scheduledTask); + this.schedule(scheduledTaskRunner, intervalMillis, taskName); } @Override diff --git a/services/src/main/java/org/keycloak/timer/basic/BasicTimerProviderFactory.java b/services/src/main/java/org/keycloak/timer/basic/BasicTimerProviderFactory.java index 335ecb01cd..ea0da94b22 100755 --- a/services/src/main/java/org/keycloak/timer/basic/BasicTimerProviderFactory.java +++ b/services/src/main/java/org/keycloak/timer/basic/BasicTimerProviderFactory.java @@ -39,7 +39,7 @@ public class BasicTimerProviderFactory implements TimerProviderFactory { @Override public TimerProvider create(KeycloakSession session) { - return new BasicTimerProvider(timer, this); + return new BasicTimerProvider(session, timer, this); } @Override