From 0c21b8c3a61c61cf17e112c0168d0f4822220ad2 Mon Sep 17 00:00:00 2001 From: mhajas Date: Fri, 28 Jul 2017 12:53:54 +0200 Subject: [PATCH] KEYCLOAK-4393 Remove example tests --- .../adapter/page/BasicAuthExample.java | 61 --- .../adapter/page/CustomerPortalExample.java | 101 ----- .../adapter/page/DatabaseServiceExample.java | 45 --- .../adapter/page/MultiTenantExample.java | 64 --- .../adapter/page/ProductPortalExample.java | 80 ---- .../adapter/page/SAMLPostEncExample.java | 51 --- .../adapter/page/SAMLPostSigExample.java | 51 --- .../adapter/page/SAMLRedirectSigExample.java | 51 --- .../AbstractBasicAuthExampleAdapterTest.java | 89 ----- .../AbstractDemoExampleAdapterTest.java | 373 ------------------ .../AbstractSAMLExampleAdapterTest.java | 126 ------ .../EAPBasicAuthExampleAdapterTest.java | 12 - .../example/EAPDemoExampleAdapterTest.java | 12 - .../example/EAPSAMLExampleAdapterTest.java | 11 - .../EAP6BasicAuthExampleAdapterTest.java | 12 - .../example/EAP6DemoExampleAdapterTest.java | 12 - .../example/EAP6SAMLExampleAdapterTest.java | 11 - ...elativeEAPBasicAuthExampleAdapterTest.java | 9 - .../RelativeEAPCorsExampleAdapterTest.java | 9 - .../RelativeEAPDemoExampleAdapterTest.java | 9 - .../RelativeEAPSAMLExampleAdapterTest.java | 9 - .../RemoteBasicAuthExampleAdapterTest.java | 12 - .../example/RemoteDemoExampleAdapterTest.java | 12 - .../example/RemoteSAMLExampleAdapterTest.java | 11 - .../WildflyDemoExampleAdapterTest.java | 12 - .../WildflySAMLExampleAdapterTest.java | 11 - .../Wildfly10BasicAuthExampleAdapterTest.java | 12 - .../Wildfly10DemoExampleAdapterTest.java | 12 - .../Wildfly10SAMLExampleAdapterTest.java | 11 - .../Wildfly8BasicAuthExampleAdapterTest.java | 12 - .../Wildfly8DemoExampleAdapterTest.java | 12 - .../Wildfly9BasicAuthExampleAdapterTest.java | 12 - .../Wildfly9DemoExampleAdapterTest.java | 12 - .../Wildfly9SAMLExampleAdapterTest.java | 11 - .../tests/other/adapters/pom.xml | 60 --- .../Tomcat7BasicAuthExampleAdapterTest.java | 12 - .../Tomcat7DemoExampleAdapterTest.java | 12 - .../Tomcat8BasicAuthExampleAdapterTest.java | 12 - .../Tomcat8DemoExampleAdapterTest.java | 12 - .../Tomcat9BasicAuthExampleAdapterTest.java | 12 - .../Tomcat9DemoExampleAdapterTest.java | 12 - 41 files changed, 1482 deletions(-) delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/BasicAuthExample.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/CustomerPortalExample.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/DatabaseServiceExample.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/MultiTenantExample.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/ProductPortalExample.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLPostEncExample.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLPostSigExample.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLRedirectSigExample.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractBasicAuthExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractDemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractSAMLExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPBasicAuthExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPDemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPSAMLExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6BasicAuthExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6DemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6SAMLExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPBasicAuthExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPCorsExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPDemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPSAMLExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/adapter/example/RemoteBasicAuthExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/adapter/example/RemoteDemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/adapter/example/RemoteSAMLExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyDemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflySAMLExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly10/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly10BasicAuthExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly10/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly10DemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly10/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly10SAMLExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8BasicAuthExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8DemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9BasicAuthExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9DemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9SAMLExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat7BasicAuthExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat7DemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8BasicAuthExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8DemoExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat9BasicAuthExampleAdapterTest.java delete mode 100644 testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat9DemoExampleAdapterTest.java diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/BasicAuthExample.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/BasicAuthExample.java deleted file mode 100644 index 09774b69d0..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/BasicAuthExample.java +++ /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. - */ - -package org.keycloak.testsuite.adapter.page; - -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.keycloak.testsuite.page.AbstractPageWithInjectedUrl; - -import javax.ws.rs.core.UriBuilder; -import java.net.URL; - -/** - * - * @author tkyjovsk - */ -public class BasicAuthExample extends AbstractPageWithInjectedUrl { - - public static final String DEPLOYMENT_NAME = "basic-auth-example"; - - @ArquillianResource - @OperateOnDeployment(DEPLOYMENT_NAME) - private URL url; - - @Override - public URL getInjectedUrl() { - //EAP6 URL fix - URL fixedUrl = createInjectedURL("basicauth"); - return fixedUrl != null ? fixedUrl : url; - } - - @Override - public UriBuilder createUriBuilder() { - return super.createUriBuilder() - .userInfo("{user}:{password}") - .path("service/echo") - .queryParam("value", "{value}"); - } - - public BasicAuthExample setTemplateValues(String user, String password, String value) { - setUriParameter("user", user); - setUriParameter("password", password); - setUriParameter("value", value); - return this; - } - -} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/CustomerPortalExample.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/CustomerPortalExample.java deleted file mode 100644 index 8f02dc609a..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/CustomerPortalExample.java +++ /dev/null @@ -1,101 +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. - */ - -package org.keycloak.testsuite.adapter.page; - -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.graphene.findby.FindByJQuery; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.keycloak.testsuite.page.AbstractPageWithInjectedUrl; -import org.openqa.selenium.WebElement; - -import java.net.URL; - -import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement; - -/** - * - * @author tkyjovsk - */ -public class CustomerPortalExample extends AbstractPageWithInjectedUrl { - - public static final String DEPLOYMENT_NAME = "customer-portal-example"; - - @ArquillianResource - @OperateOnDeployment(DEPLOYMENT_NAME) - private URL url; - - @Override - public URL getInjectedUrl() { - //EAP6 URL fix - URL fixedUrl = createInjectedURL("customer-portal"); - return fixedUrl != null ? fixedUrl : url; - } - - @FindByJQuery("h1:contains('Customer Portal')") - private WebElement title; - - @FindByJQuery("a:contains('Customer Listing')") - private WebElement customerListingLink; - @FindByJQuery("h1:contains('Customer Listing')") - private WebElement customerListingHeader; - - @FindByJQuery("h1:contains('Customer Session')") - private WebElement customerSessionHeader; - - @FindByJQuery("a:contains('Customer Admin Interface')") - private WebElement customerAdminInterfaceLink; - - @FindByJQuery("a:contains('Customer Session')") - private WebElement customerSessionLink; - - @FindByJQuery("a:contains('products')") - private WebElement productsLink; - - @FindByJQuery("a:contains('logout')") - private WebElement logOutButton; - - public void goToProducts() { - productsLink.click(); - } - - public void customerListing() { - customerListingLink.click(); - } - - public void customerAdminInterface() { - customerAdminInterfaceLink.click(); - } - - public void customerSession() { - waitUntilElement(customerSessionLink).is().present(); - customerSessionLink.click(); - } - - public void logOut() { - logOutButton.click(); - } - - public void waitForCustomerListingHeader() { - waitUntilElement(customerListingHeader).is().not().present(); - } - - public void waitForCustomerSessionHeader() { - waitUntilElement(customerSessionHeader).is().not().present(); - } - -} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/DatabaseServiceExample.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/DatabaseServiceExample.java deleted file mode 100644 index c856064a9d..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/DatabaseServiceExample.java +++ /dev/null @@ -1,45 +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. - */ - -package org.keycloak.testsuite.adapter.page; - -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.keycloak.testsuite.page.AbstractPageWithInjectedUrl; - -import java.net.URL; - -/** - * - * @author tkyjovsk - */ -public class DatabaseServiceExample extends AbstractPageWithInjectedUrl { - - public static final String DEPLOYMENT_NAME = "database-service-example"; - - @ArquillianResource - @OperateOnDeployment(DEPLOYMENT_NAME) - private URL url; - - @Override - public URL getInjectedUrl() { - //EAP6 URL fix - URL fixedUrl = createInjectedURL("database"); - return fixedUrl != null ? fixedUrl : url; - } - -} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/MultiTenantExample.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/MultiTenantExample.java deleted file mode 100644 index 7cff7140d4..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/MultiTenantExample.java +++ /dev/null @@ -1,64 +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. - */ - -package org.keycloak.testsuite.adapter.page; - -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.keycloak.testsuite.page.AbstractPageWithInjectedUrl; - -import javax.ws.rs.core.UriBuilder; -import java.net.MalformedURLException; -import java.net.URL; - -/** - * - * @author tkyjovsk - */ -public class MultiTenantExample extends AbstractPageWithInjectedUrl { - - public static final String DEPLOYMENT_NAME = "multi-tenant-example"; - - @ArquillianResource - @OperateOnDeployment(DEPLOYMENT_NAME) - private URL url; - - @Override - public URL getInjectedUrl() { - return url; - } - - @Override - public UriBuilder createUriBuilder() { - return super.createUriBuilder().path("{tenantRealm}"); - } - - public URL getTenantRealmUrl(String realm) { - try { - return getUriBuilder().build(realm).toURL(); - } catch (MalformedURLException ex) { - throw new IllegalStateException("Page URL is malformed."); - } - } - - public void navigateToRealm(String realm) { - URL u = getTenantRealmUrl(realm); - log.info("navigate to "+u.toExternalForm()); - driver.navigate().to(u.toExternalForm()); - } - -} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/ProductPortalExample.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/ProductPortalExample.java deleted file mode 100644 index 81c8b0a0cb..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/ProductPortalExample.java +++ /dev/null @@ -1,80 +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. - */ - -package org.keycloak.testsuite.adapter.page; - -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.graphene.findby.FindByJQuery; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.keycloak.testsuite.page.AbstractPageWithInjectedUrl; -import org.openqa.selenium.WebElement; - -import java.net.URL; - -import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement; - -/** - * - * @author tkyjovsk - */ -public class ProductPortalExample extends AbstractPageWithInjectedUrl { - - public static final String DEPLOYMENT_NAME = "product-portal-example"; - - @ArquillianResource - @OperateOnDeployment(DEPLOYMENT_NAME) - private URL url; - - @Override - public URL getInjectedUrl() { - //EAP6 URL fix - URL fixedUrl = createInjectedURL("product-portal"); - return fixedUrl != null ? fixedUrl : url; - } - - @FindByJQuery("h1:contains('Product Portal')") - private WebElement title; - - @FindByJQuery("a:contains('Product Listing')") - private WebElement productListingLink; - @FindByJQuery("h1:contains('Product Listing')") - private WebElement productListingHeader; - - @FindByJQuery("a:contains('customers')") - private WebElement customersLink; - - @FindByJQuery("a:contains('logout')") - private WebElement logOutButton; - - public void productListing() { - productListingLink.click(); - } - - public void goToCustomers() { - customersLink.click(); - } - - public void waitForProductListingHeader() { - waitUntilElement(productListingHeader).is().not().present(); - } - - public void logOut() { - logOutButton.click(); - } - - -} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLPostEncExample.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLPostEncExample.java deleted file mode 100644 index 6772ea9d90..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLPostEncExample.java +++ /dev/null @@ -1,51 +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. - */ - -package org.keycloak.testsuite.adapter.page; - -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.keycloak.testsuite.page.AbstractPageWithInjectedUrl; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -import java.net.URL; - -/** - * @author mhajas - */ -public class SAMLPostEncExample extends AbstractPageWithInjectedUrl { - public static final String DEPLOYMENT_NAME = "saml-post-encryption"; - - @ArquillianResource - @OperateOnDeployment(DEPLOYMENT_NAME) - private URL url; - - @FindBy(tagName = "a") - WebElement logoutButton; - - @Override - public URL getInjectedUrl() { - //EAP6 URL fix - URL fixedUrl = createInjectedURL("sales-post-enc"); - return fixedUrl != null ? fixedUrl : url; - } - - public void logout() { - logoutButton.click(); - } -} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLPostSigExample.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLPostSigExample.java deleted file mode 100644 index 7105bd1a64..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLPostSigExample.java +++ /dev/null @@ -1,51 +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. - */ - -package org.keycloak.testsuite.adapter.page; - -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.keycloak.testsuite.page.AbstractPageWithInjectedUrl; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -import java.net.URL; - -/** - * @author mhajas - */ -public class SAMLPostSigExample extends AbstractPageWithInjectedUrl { - public static final String DEPLOYMENT_NAME = "sales-post-sig"; - - @ArquillianResource - @OperateOnDeployment(DEPLOYMENT_NAME) - private URL url; - - @FindBy(tagName = "a") - WebElement logoutButton; - - @Override - public URL getInjectedUrl() { - //EAP6 URL fix - URL fixedUrl = createInjectedURL("sales-post-sig"); - return fixedUrl != null ? fixedUrl : url; - } - - public void logout() { - logoutButton.click(); - } -} diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLRedirectSigExample.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLRedirectSigExample.java deleted file mode 100644 index 78e1316a33..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/adapter/page/SAMLRedirectSigExample.java +++ /dev/null @@ -1,51 +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. - */ - -package org.keycloak.testsuite.adapter.page; - -import org.jboss.arquillian.container.test.api.OperateOnDeployment; -import org.jboss.arquillian.test.api.ArquillianResource; -import org.keycloak.testsuite.page.AbstractPageWithInjectedUrl; -import org.openqa.selenium.WebElement; -import org.openqa.selenium.support.FindBy; - -import java.net.URL; - -/** - * @author mhajas - */ -public class SAMLRedirectSigExample extends AbstractPageWithInjectedUrl { - public static final String DEPLOYMENT_NAME = "saml-redirect-signatures"; - - @ArquillianResource - @OperateOnDeployment(DEPLOYMENT_NAME) - private URL url; - - @FindBy(tagName = "a") - WebElement logoutButton; - - @Override - public URL getInjectedUrl() { - //EAP6 URL fix - URL fixedUrl = createInjectedURL("employee-sig"); - return fixedUrl != null ? fixedUrl : url; - } - - public void logout() { - logoutButton.click(); - } -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractBasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractBasicAuthExampleAdapterTest.java deleted file mode 100644 index 57868f28be..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractBasicAuthExampleAdapterTest.java +++ /dev/null @@ -1,89 +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. - */ - -package org.keycloak.testsuite.adapter.example; - -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.graphene.page.Page; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.Test; -import org.keycloak.representations.idm.RealmRepresentation; -import org.keycloak.testsuite.adapter.AbstractExampleAdapterTest; -import org.keycloak.testsuite.adapter.page.BasicAuthExample; - -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; -import javax.ws.rs.core.Response; -import java.io.File; -import java.io.IOException; -import java.util.List; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.keycloak.testsuite.auth.page.AuthRealm.EXAMPLE; -import static org.keycloak.testsuite.util.IOUtil.loadRealm; - -public abstract class AbstractBasicAuthExampleAdapterTest extends AbstractExampleAdapterTest { - - @Page - private BasicAuthExample basicAuthExample; - - @Deployment(name = BasicAuthExample.DEPLOYMENT_NAME) - private static WebArchive basicAuthExample() throws IOException { - return exampleDeployment("examples-basicauth"); - } - - @Override - public void addAdapterTestRealms(List testRealms) { - testRealms.add(loadRealm(new File(EXAMPLES_HOME_DIR + "/basic-auth/basicauthrealm.json"))); - } - - @Override - public void setDefaultPageUriParameters() { - super.setDefaultPageUriParameters(); - testRealmPage.setAuthRealm(EXAMPLE); - } - - @Test - public void testBasicAuthExample() { - String value = "hello"; - Client client = ClientBuilder.newClient(); - - Response response = client.target(basicAuthExample - .setTemplateValues("admin", "password", value).buildUri()).request().get(); - assertEquals(200, response.getStatus()); - assertEquals(value, response.readEntity(String.class)); - response.close(); - - response = client.target(basicAuthExample - .setTemplateValues("invalid-user", "password", value).buildUri()).request().get(); - assertEquals(401, response.getStatus()); - String readResponse = response.readEntity(String.class); - assertTrue(readResponse.contains("Unauthorized") || readResponse.contains("Status 401")); - response.close(); - - response = client.target(basicAuthExample - .setTemplateValues("admin", "invalid-password", value).buildUri()).request().get(); - assertEquals(401, response.getStatus()); - readResponse = response.readEntity(String.class); - assertTrue(readResponse.contains("Unauthorized") || readResponse.contains("Status 401")); - response.close(); - - client.close(); - } - -} diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractDemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractDemoExampleAdapterTest.java deleted file mode 100644 index 4db4a3c46a..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractDemoExampleAdapterTest.java +++ /dev/null @@ -1,373 +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. - */ - -package org.keycloak.testsuite.adapter.example; - -import org.apache.commons.io.FileUtils; -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.graphene.page.Page; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.keycloak.admin.client.resource.ClientResource; -import org.keycloak.representations.idm.ClientRepresentation; -import org.keycloak.representations.idm.RealmRepresentation; -import org.keycloak.representations.idm.UserRepresentation; -import org.keycloak.testsuite.adapter.AbstractExampleAdapterTest; -import org.keycloak.testsuite.adapter.page.CustomerPortalExample; -import org.keycloak.testsuite.adapter.page.DatabaseServiceExample; -import org.keycloak.testsuite.adapter.page.ProductPortalExample; -import org.keycloak.testsuite.admin.ApiUtil; -import org.keycloak.testsuite.auth.page.account.Account; -import org.keycloak.testsuite.auth.page.account.Applications; -import org.keycloak.testsuite.auth.page.login.OAuthGrant; -import org.keycloak.testsuite.console.page.events.Config; -import org.keycloak.testsuite.console.page.events.LoginEvents; -import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; - -import java.io.File; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.keycloak.testsuite.auth.page.AuthRealm.DEMO; -import static org.keycloak.testsuite.util.IOUtil.loadRealm; -import static org.keycloak.testsuite.util.URLAssert.assertCurrentUrlStartsWith; - -public abstract class AbstractDemoExampleAdapterTest extends AbstractExampleAdapterTest { - - @Page - private CustomerPortalExample customerPortalExamplePage; - - @Page - private ProductPortalExample productPortalExamplePage; - - @Page - private DatabaseServiceExample databaseServiceExamplePage; - - @Page - private Account testRealmAccountPage; - - @Page - private Config configPage; - - @Page - private LoginEvents loginEventsPage; - - @Page - private OAuthGrant oAuthGrantPage; - - @Page - private Applications applicationsPage; - - @Deployment(name = CustomerPortalExample.DEPLOYMENT_NAME) - private static WebArchive customerPortalExample() throws IOException { - return exampleDeployment(CustomerPortalExample.DEPLOYMENT_NAME); - } - - @Deployment(name = ProductPortalExample.DEPLOYMENT_NAME) - private static WebArchive productPortalExample() throws IOException { - return exampleDeployment(ProductPortalExample.DEPLOYMENT_NAME); - } - - @Deployment(name = DatabaseServiceExample.DEPLOYMENT_NAME) - private static WebArchive databaseServiceExample() throws IOException { - return exampleDeployment("database-service"); - } - - @Override - public void addAdapterTestRealms(List testRealms) { - testRealms.add( - loadRealm(new File(EXAMPLES_HOME_DIR + "/demo-template/testrealm.json"))); - } - - @Override - public void setDefaultPageUriParameters() { - super.setDefaultPageUriParameters(); - testRealmPage.setAuthRealm(DEMO); - testRealmLoginPage.setAuthRealm(DEMO); - testRealmAccountPage.setAuthRealm(DEMO); - configPage.setConsoleRealm(DEMO); - loginEventsPage.setConsoleRealm(DEMO); - applicationsPage.setAuthRealm(DEMO); - } - - @Before - public void beforeDemoExampleTest() { - customerPortalExamplePage.navigateTo(); - driver.manage().deleteAllCookies(); - productPortalExamplePage.navigateTo(); - driver.manage().deleteAllCookies(); - } - - @Test - public void customerPortalListingTest() { - - customerPortalExamplePage.navigateTo(); - customerPortalExamplePage.customerListing(); - - testRealmLoginPage.form().login("bburke@redhat.com", "password"); - - assertCurrentUrlStartsWith(customerPortalExamplePage); - customerPortalExamplePage.waitForCustomerListingHeader(); - - Assert.assertTrue(driver.getPageSource().contains("Username: bburke@redhat.com")); - Assert.assertTrue(driver.getPageSource().contains("Bill Burke")); - Assert.assertTrue(driver.getPageSource().contains("Stian Thorgersen")); - } - - @Test - public void customerPortalSessionTest() { - - customerPortalExamplePage.navigateTo(); - customerPortalExamplePage.customerSession(); - - testRealmLoginPage.form().login("bburke@redhat.com", "password"); - - assertCurrentUrlStartsWith(customerPortalExamplePage); - - customerPortalExamplePage.waitForCustomerSessionHeader(); - Assert.assertTrue(driver.getPageSource().contains("You visited this page")); - } - - @Test - public void productPortalListingTest() { - - productPortalExamplePage.navigateTo(); - productPortalExamplePage.productListing(); - - testRealmLoginPage.form().login("bburke@redhat.com", "password"); - - assertCurrentUrlStartsWith(productPortalExamplePage); - productPortalExamplePage.waitForProductListingHeader(); - - Assert.assertTrue(driver.getPageSource().contains("iphone")); - Assert.assertTrue(driver.getPageSource().contains("ipad")); - Assert.assertTrue(driver.getPageSource().contains("ipod")); - - productPortalExamplePage.goToCustomers(); - } - - @Test - public void goToProductPortalWithOneLoginTest() { - - productPortalExamplePage.navigateTo(); - productPortalExamplePage.productListing(); - - testRealmLoginPage.form().login("bburke@redhat.com", "password"); - - assertCurrentUrlStartsWith(productPortalExamplePage); - productPortalExamplePage.waitForProductListingHeader(); - productPortalExamplePage.goToCustomers(); - - assertCurrentUrlStartsWith(customerPortalExamplePage); - customerPortalExamplePage.customerListing(); - customerPortalExamplePage.goToProducts(); - assertCurrentUrlStartsWith(productPortalExamplePage); - } - - @Test - public void logoutFromAllAppsTest() { - - productPortalExamplePage.navigateTo(); - productPortalExamplePage.productListing(); - - testRealmLoginPage.form().login("bburke@redhat.com", "password"); - - assertCurrentUrlStartsWith(productPortalExamplePage); - productPortalExamplePage.waitForProductListingHeader(); - - if (isRelative()) { //KEYCLOAK-1546 - productPortalExamplePage.logOut(); - } else { - driver.navigate().to(testRealmPage.getOIDCLogoutUrl() + "?redirect_uri=" + productPortalExamplePage); - } - - assertCurrentUrlStartsWith(productPortalExamplePage); - productPortalExamplePage.productListing(); - - customerPortalExamplePage.navigateTo(); - customerPortalExamplePage.customerListing(); - testRealmLoginPage.form().login("bburke@redhat.com", "password"); - - customerPortalExamplePage.logOut(); - } - - @Test - public void grantServerBasedApp() { - ClientResource clientResource = ApiUtil.findClientResourceByClientId(testRealmResource(), "customer-portal"); - ClientRepresentation client = clientResource.toRepresentation(); - client.setConsentRequired(true); - clientResource.update(client); - - RealmRepresentation realm = testRealmResource().toRepresentation(); - realm.setEventsEnabled(true); - realm.setEnabledEventTypes(Arrays.asList("REVOKE_GRANT", "LOGIN")); - testRealmResource().update(realm); - - customerPortalExamplePage.navigateTo(); - customerPortalExamplePage.customerSession(); - - loginPage.form().login("bburke@redhat.com", "password"); - - assertTrue(oAuthGrantPage.isCurrent()); - - oAuthGrantPage.accept(); - - assertTrue(driver.getPageSource().contains("Your hostname:")); - assertTrue(driver.getPageSource().contains("You visited this page")); - - applicationsPage.navigateTo(); - applicationsPage.revokeGrantForApplication("customer-portal"); - - customerPortalExamplePage.navigateTo(); - customerPortalExamplePage.customerSession(); - - assertTrue(oAuthGrantPage.isCurrent()); - - loginEventsPage.navigateTo(); - if (!testContext.isAdminLoggedIn()) { - loginPage.form().login(adminUser); - testContext.setAdminLoggedIn(true); - } - loginEventsPage.table().filter(); - loginEventsPage.table().filterForm().addEventType("REVOKE_GRANT"); - loginEventsPage.table().update(); - - List resultList = loginEventsPage.table().rows(); - - assertEquals(1, resultList.size()); - - resultList.get(0).findElement(By.xpath(".//td[text()='REVOKE_GRANT']")); - resultList.get(0).findElement(By.xpath(".//td[text()='Client']/../td[text()='account']")); - resultList.get(0).findElement(By.xpath(".//td[text()='IP Address']/../td[text()='127.0.0.1' or text()='0:0:0:0:0:0:0:1']")); - resultList.get(0).findElement(By.xpath(".//td[text()='revoked_client']/../td[text()='customer-portal']")); - - loginEventsPage.table().reset(); - loginEventsPage.table().filterForm().addEventType("LOGIN"); - loginEventsPage.table().update(); - resultList = loginEventsPage.table().rows(); - - assertEquals(1, resultList.size()); - - resultList.get(0).findElement(By.xpath(".//td[text()='LOGIN']")); - resultList.get(0).findElement(By.xpath(".//td[text()='Client']/../td[text()='customer-portal']")); - resultList.get(0).findElement(By.xpath(".//td[text()='IP Address']/../td[text()='127.0.0.1' or text()='0:0:0:0:0:0:0:1']")); - resultList.get(0).findElement(By.xpath(".//td[text()='username']/../td[text()='bburke@redhat.com']")); - resultList.get(0).findElement(By.xpath(".//td[text()='consent']/../td[text()='consent_granted']")); - } - - @Test - public void historyOfAccessResourceTest() throws IOException { - RealmRepresentation realm = testRealmResource().toRepresentation(); - realm.setEventsEnabled(true); - realm.setEnabledEventTypes(Arrays.asList("LOGIN", "LOGIN_ERROR", "LOGOUT", "CODE_TO_TOKEN")); - testRealmResource().update(realm); - - customerPortalExamplePage.navigateTo(); - customerPortalExamplePage.customerListing(); - - testRealmLoginPage.form().login("bburke@redhat.com", "password"); - - Assert.assertTrue(driver.getPageSource().contains("Username: bburke@redhat.com") - && driver.getPageSource().contains("Bill Burke") - && driver.getPageSource().contains("Stian Thorgersen") - ); - - if (isRelative()) { //KEYCLOAK-1546 - productPortalExamplePage.logOut(); - } else { - driver.navigate().to(testRealmPage.getOIDCLogoutUrl() + "?redirect_uri=" + productPortalExamplePage); - } - - loginEventsPage.navigateTo(); - - if (!testContext.isAdminLoggedIn()) { - loginPage.form().login(adminUser); - testContext.setAdminLoggedIn(true); - } - - loginEventsPage.table().filter(); - loginEventsPage.table().filterForm().addEventType("LOGOUT"); - loginEventsPage.table().update(); - - List resultList = loginEventsPage.table().rows(); - - assertEquals(1, resultList.size()); - - resultList.get(0).findElement(By.xpath(".//td[text()='LOGOUT']")); - resultList.get(0).findElement(By.xpath(".//td[text()='Client']/../td[text()='']")); - resultList.get(0).findElement(By.xpath(".//td[text()='IP Address']/../td[text()='127.0.0.1' or text()='0:0:0:0:0:0:0:1']")); - - loginEventsPage.table().reset(); - loginEventsPage.table().filterForm().addEventType("LOGIN"); - loginEventsPage.table().update(); - resultList = loginEventsPage.table().rows(); - - assertEquals(1, resultList.size()); - - resultList.get(0).findElement(By.xpath(".//td[text()='LOGIN']")); - resultList.get(0).findElement(By.xpath(".//td[text()='Client']/../td[text()='customer-portal']")); - resultList.get(0).findElement(By.xpath(".//td[text()='IP Address']/../td[text()='127.0.0.1' or text()='0:0:0:0:0:0:0:1']")); - resultList.get(0).findElement(By.xpath(".//td[text()='username']/../td[text()='bburke@redhat.com']")); - - loginEventsPage.table().reset(); - loginEventsPage.table().filterForm().addEventType("CODE_TO_TOKEN"); - loginEventsPage.table().update(); - resultList = loginEventsPage.table().rows(); - - assertEquals(1, resultList.size()); - resultList.get(0).findElement(By.xpath(".//td[text()='CODE_TO_TOKEN']")); - resultList.get(0).findElement(By.xpath(".//td[text()='Client']/../td[text()='customer-portal']")); - resultList.get(0).findElement(By.xpath(".//td[text()='IP Address']/../td[text()='127.0.0.1' or text()='0:0:0:0:0:0:0:1']")); - resultList.get(0).findElement(By.xpath(".//td[text()='refresh_token_type']/../td[text()='Refresh']")); - - String serverLogPath = null; - - if (System.getProperty("app.server").equals("wildfly") || System.getProperty("app.server").equals("eap6") || System.getProperty("app.server").equals("eap")) { - serverLogPath = System.getProperty("app.server.home") + "/standalone/log/server.log"; - } - - String appServerUrl; - if (Boolean.parseBoolean(System.getProperty("app.server.ssl.required"))) { - appServerUrl = "https://localhost:" + System.getProperty("app.server.https.port", "8543") + "/"; - } else { - appServerUrl = "http://localhost:" + System.getProperty("app.server.http.port", "8280") + "/"; - } - - if (serverLogPath != null) { - log.info("Checking app server log at: " + serverLogPath); - File serverLog = new File(serverLogPath); - String serverLogContent = FileUtils.readFileToString(serverLog); - UserRepresentation bburke = ApiUtil.findUserByUsername(testRealmResource(), "bburke@redhat.com"); - - Pattern pattern = Pattern.compile("User '" + bburke.getId() + "' invoking '" + appServerUrl + "customer-portal\\/customers\\/view\\.jsp[^\\s]+' on client 'customer-portal'"); - Matcher matcher = pattern.matcher(serverLogContent); - - assertTrue(matcher.find()); - assertTrue(serverLogContent.contains("User '" + bburke.getId() + "' invoking '" + appServerUrl + "database/customers' on client 'database-service'")); - } else { - log.info("Checking app server log on app-server: \"" + System.getProperty("app.server") + "\" is not supported."); - } - } -} diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractSAMLExampleAdapterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractSAMLExampleAdapterTest.java deleted file mode 100644 index 3a0676e499..0000000000 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/adapter/example/AbstractSAMLExampleAdapterTest.java +++ /dev/null @@ -1,126 +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. - */ - -package org.keycloak.testsuite.adapter.example; - -import org.jboss.arquillian.container.test.api.Deployment; -import org.jboss.arquillian.graphene.page.Page; -import org.jboss.shrinkwrap.api.spec.WebArchive; -import org.junit.Test; -import org.keycloak.representations.idm.RealmRepresentation; -import org.keycloak.testsuite.adapter.AbstractExampleAdapterTest; -import org.keycloak.testsuite.adapter.page.SAMLPostEncExample; -import org.keycloak.testsuite.adapter.page.SAMLPostSigExample; -import org.keycloak.testsuite.adapter.page.SAMLRedirectSigExample; -import org.keycloak.testsuite.util.URLAssert; -import org.openqa.selenium.By; - -import java.io.File; -import java.io.IOException; -import java.util.List; - -import static org.keycloak.testsuite.auth.page.AuthRealm.SAMLDEMO; -import static org.keycloak.testsuite.util.IOUtil.loadRealm; -import static org.keycloak.testsuite.util.WaitUtils.waitUntilElement; - -/** - * @author mhajas - */ -public abstract class AbstractSAMLExampleAdapterTest extends AbstractExampleAdapterTest { - - @Page - private SAMLPostSigExample samlPostSigExamplePage; - - @Page - private SAMLPostEncExample samlPostEncExamplePage; - - @Page - private SAMLRedirectSigExample samlRedirectSigExamplePage; - - @Override - public void addAdapterTestRealms(List testRealms) { - RealmRepresentation samlRealm = loadRealm(new File(EXAMPLES_HOME_DIR + "/saml/testsaml.json")); - testRealms.add(samlRealm); - } - - @Override - public void setDefaultPageUriParameters() { - super.setDefaultPageUriParameters(); - testRealmPage.setAuthRealm(SAMLDEMO); - testRealmSAMLRedirectLoginPage.setAuthRealm(SAMLDEMO); - testRealmSAMLPostLoginPage.setAuthRealm(SAMLDEMO); - } - - @Deployment(name = SAMLPostSigExample.DEPLOYMENT_NAME) - private static WebArchive samlPostSigExampleDeployment() throws IOException { - return exampleDeployment(SAMLPostSigExample.DEPLOYMENT_NAME); - } - - @Deployment(name = SAMLPostEncExample.DEPLOYMENT_NAME) - private static WebArchive samlPostEncExampleDeployment() throws IOException { - return exampleDeployment(SAMLPostEncExample.DEPLOYMENT_NAME); - } - - @Deployment(name = SAMLRedirectSigExample.DEPLOYMENT_NAME) - private static WebArchive samlRedirectSigExampleDeployment() throws IOException { - return exampleDeployment(SAMLRedirectSigExample.DEPLOYMENT_NAME); - } - - @Test - public void samlPostWithSignatureExampleTest() { - samlPostSigExamplePage.navigateTo(); - testRealmSAMLPostLoginPage.form().login(bburkeUser); - - waitUntilElement(By.xpath("//body")).text().contains("Welcome to the Sales Tool, " + bburkeUser.getUsername()); - - samlPostSigExamplePage.logout(); - waitUntilElement(By.xpath("//body")).text().contains("Logged out."); - - samlPostSigExamplePage.navigateTo(); - URLAssert.assertCurrentUrlStartsWith(testRealmSAMLPostLoginPage); - } - - @Test - public void samlPostWithEncryptionExampleTest() { - samlPostEncExamplePage.navigateTo(); - - testRealmSAMLPostLoginPage.form().login(bburkeUser); - - waitUntilElement(By.xpath("//body")).text().contains("Welcome to the Sales Tool, " + bburkeUser.getUsername()); - - samlPostEncExamplePage.logout(); - waitUntilElement(By.xpath("//body")).text().contains("Logged out."); - - samlPostEncExamplePage.navigateTo(); - URLAssert.assertCurrentUrlStartsWith(testRealmSAMLPostLoginPage); - } - - @Test - public void samlRedirectWithSignatureExampleTest() { - samlRedirectSigExamplePage.navigateTo(); - - testRealmSAMLRedirectLoginPage.form().login(bburkeUser); - - waitUntilElement(By.xpath("//body")).text().contains("Welcome to the Employee Tool,"); - - samlRedirectSigExamplePage.logout(); - URLAssert.assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage); - - samlRedirectSigExamplePage.navigateTo(); - URLAssert.assertCurrentUrlStartsWith(testRealmSAMLRedirectLoginPage); - } -} 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 deleted file mode 100644 index 574ee16c4c..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPBasicAuthExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-eap") -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 deleted file mode 100644 index f461222e5e..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPDemoExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-eap") -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 deleted file mode 100644 index b5431ff7b8..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap/src/test/java/org/keycloak/testsuite/adapter/example/EAPSAMLExampleAdapterTest.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * @author mhajas - */ -@AppServerContainer("app-server-eap") -public class EAPSAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { - -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/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 deleted file mode 100644 index 8299093dc2..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6BasicAuthExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-eap6") -public class EAP6BasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/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 deleted file mode 100644 index d0c0c95e74..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6DemoExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-eap6") -public class EAP6DemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { - -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/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 deleted file mode 100644 index 208d43098e..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/eap6/src/test/java/org/keycloak/testsuite/adapter/example/EAP6SAMLExampleAdapterTest.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * @author mhajas - */ -@AppServerContainer("app-server-eap6") -public class EAP6SAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { - -} \ 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/RelativeEAPBasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPBasicAuthExampleAdapterTest.java deleted file mode 100644 index 9d779502d2..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPBasicAuthExampleAdapterTest.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -/** - * - * @author tkyjovsk - */ -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 deleted file mode 100644 index b96ee75e0f..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPCorsExampleAdapterTest.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -/** - * - * @author fkiss - */ -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 deleted file mode 100644 index ef94eee5b3..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPDemoExampleAdapterTest.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -/** - * - * @author tkyjovsk - */ -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/RelativeEAPSAMLExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPSAMLExampleAdapterTest.java deleted file mode 100644 index 2afe2381e1..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/relative/eap/src/test/java/org/keycloak/testsuite/adapter/example/RelativeEAPSAMLExampleAdapterTest.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -/** - * - * @author mhajas - */ -public class RelativeEAPSAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { - -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/adapter/example/RemoteBasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/adapter/example/RemoteBasicAuthExampleAdapterTest.java deleted file mode 100644 index 07b907e21a..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/adapter/example/RemoteBasicAuthExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-remote") -public class RemoteBasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/adapter/example/RemoteDemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/adapter/example/RemoteDemoExampleAdapterTest.java deleted file mode 100644 index 90860d24e5..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/adapter/example/RemoteDemoExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-remote") -public class RemoteDemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { - -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/adapter/example/RemoteSAMLExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/adapter/example/RemoteSAMLExampleAdapterTest.java deleted file mode 100644 index 9dca78baf0..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/remote/src/test/java/org/keycloak/testsuite/adapter/example/RemoteSAMLExampleAdapterTest.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * @author mhajas - */ -@AppServerContainer("app-server-remote") -public class RemoteSAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { - -} \ 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/WildflyDemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyDemoExampleAdapterTest.java deleted file mode 100644 index 588c28d82d..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflyDemoExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-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 deleted file mode 100644 index e118da1f1b..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly/src/test/java/org/keycloak/testsuite/adapter/example/WildflySAMLExampleAdapterTest.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * @author mhajas - */ -@AppServerContainer("app-server-wildfly") -public class WildflySAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { - -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly10/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly10BasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly10/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly10BasicAuthExampleAdapterTest.java deleted file mode 100644 index f49dd19949..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly10/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly10BasicAuthExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-wildfly10") -public class Wildfly10BasicAuthExampleAdapterTest extends AbstractBasicAuthExampleAdapterTest { - -} diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly10/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly10DemoExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly10/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly10DemoExampleAdapterTest.java deleted file mode 100644 index 6117bfd86e..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly10/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly10DemoExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-wildfly10") -public class Wildfly10DemoExampleAdapterTest extends AbstractDemoExampleAdapterTest { - -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly10/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly10SAMLExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly10/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly10SAMLExampleAdapterTest.java deleted file mode 100644 index d7a162c927..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly10/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly10SAMLExampleAdapterTest.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * @author mhajas - */ -@AppServerContainer("app-server-wildfly10") -public class Wildfly10SAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { - -} \ No newline at end of file diff --git a/testsuite/integration-arquillian/tests/other/adapters/jboss/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 deleted file mode 100644 index dc4e7cc76c..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8BasicAuthExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-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 deleted file mode 100644 index 8bb20d8b67..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly8/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly8DemoExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-wildfly8") -public class Wildfly8DemoExampleAdapterTest 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/Wildfly9BasicAuthExampleAdapterTest.java b/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9BasicAuthExampleAdapterTest.java deleted file mode 100644 index 9d68c8a383..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9BasicAuthExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-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 deleted file mode 100644 index 26ce953a62..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9DemoExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * - * @author tkyjovsk - */ -@AppServerContainer("app-server-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 deleted file mode 100644 index e5e5c27dab..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/jboss/wildfly9/src/test/java/org/keycloak/testsuite/adapter/example/Wildfly9SAMLExampleAdapterTest.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.keycloak.testsuite.adapter.example; - -import org.keycloak.testsuite.arquillian.annotation.AppServerContainer; - -/** - * @author mhajas - */ -@AppServerContainer("app-server-wildfly9") -public class Wildfly9SAMLExampleAdapterTest extends AbstractSAMLExampleAdapterTest { - -} \ 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 6cfc621f24..bf67275f56 100644 --- a/testsuite/integration-arquillian/tests/other/adapters/pom.xml +++ b/testsuite/integration-arquillian/tests/other/adapters/pom.xml @@ -265,24 +265,6 @@ - - org.keycloak.example.demo - product-portal-example - ${project.version} - war - - - org.keycloak.example.demo - customer-portal-example - ${project.version} - war - - - org.keycloak.example.demo - database-service - ${project.version} - war - org.keycloak.testsuite integration-arquillian-test-apps-js-console @@ -295,48 +277,6 @@ ${project.version} war - - org.keycloak - examples-multitenant - ${project.version} - war - - - org.keycloak - examples-basicauth - ${project.version} - war - - - org.keycloak.example.demo - cors-angular-product-example - ${project.version} - war - - - org.keycloak.example.demo - cors-database-service - ${project.version} - war - - - org.keycloak - sales-post-sig - ${project.version} - war - - - org.keycloak - saml-post-encryption - ${project.version} - war - - - org.keycloak - saml-redirect-signatures - ${project.version} - war - org.keycloak.testsuite hello-world-authz-service 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 deleted file mode 100644 index cd1e26b6b4..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat7BasicAuthExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index cbfd42756e..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat7/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat7DemoExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -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/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 deleted file mode 100644 index 175ed9ef1a..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8BasicAuthExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index ef3d06d0a4..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat8/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat8DemoExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -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/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 deleted file mode 100644 index 221c006761..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat9BasicAuthExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 56ae537146..0000000000 --- a/testsuite/integration-arquillian/tests/other/adapters/tomcat/tomcat9/src/test/java/org/keycloak/testsuite/adapter/example/Tomcat9DemoExampleAdapterTest.java +++ /dev/null @@ -1,12 +0,0 @@ -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