From 6bb7a8894d6deb1ab46be59d99b3a124e582e733 Mon Sep 17 00:00:00 2001 From: Pedro Igor Date: Wed, 16 Jun 2021 11:55:39 -0300 Subject: [PATCH] [KEYCLOAK-18464] - Failures when running without tls and remote --- .../testsuite/admin/userprofile/UserProfileAdminTest.java | 2 ++ .../testsuite/forms/RegisterWithUserProfileTest.java | 6 ++++-- .../org/keycloak/testsuite/forms/VerifyProfileTest.java | 6 ++++-- .../keycloak/testsuite/user/profile/UserProfileTest.java | 2 ++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/userprofile/UserProfileAdminTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/userprofile/UserProfileAdminTest.java index 756c9d9336..c764a8e483 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/userprofile/UserProfileAdminTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/userprofile/UserProfileAdminTest.java @@ -31,6 +31,7 @@ import org.keycloak.common.Profile; import org.keycloak.common.util.StreamUtil; import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.testsuite.admin.AbstractAdminTest; +import org.keycloak.testsuite.arquillian.annotation.AuthServerContainerExclude; import org.keycloak.testsuite.arquillian.annotation.EnableFeature; import org.keycloak.testsuite.arquillian.annotation.SetDefaultProvider; import org.keycloak.userprofile.UserProfileSpi; @@ -44,6 +45,7 @@ import org.keycloak.userprofile.config.DeclarativeUserProfileProvider; beforeEnableFeature = false, onlyUpdateDefault = true ) +@AuthServerContainerExclude(AuthServerContainerExclude.AuthServer.REMOTE) public class UserProfileAdminTest extends AbstractAdminTest { @Override diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/RegisterWithUserProfileTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/RegisterWithUserProfileTest.java index 0ffb8b424c..95bea71af7 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/RegisterWithUserProfileTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/RegisterWithUserProfileTest.java @@ -26,6 +26,7 @@ import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.UserRepresentation; import org.keycloak.testsuite.AssertEvents; import org.keycloak.testsuite.AbstractTestRealmKeycloakTest; +import org.keycloak.testsuite.arquillian.annotation.AuthServerContainerExclude; import org.keycloak.testsuite.arquillian.annotation.EnableFeature; import org.keycloak.testsuite.arquillian.annotation.SetDefaultProvider; import org.keycloak.testsuite.pages.*; @@ -51,6 +52,7 @@ import java.util.Collections; beforeEnableFeature = false, onlyUpdateDefault = true ) +@AuthServerContainerExclude(AuthServerContainerExclude.AuthServer.REMOTE) public class RegisterWithUserProfileTest extends AbstractTestRealmKeycloakTest { @Rule @@ -89,10 +91,10 @@ public class RegisterWithUserProfileTest extends AbstractTestRealmKeycloakTest { testRealm.setClientScopes(Collections.singletonList(ClientScopeBuilder.create().name(SCOPE_LAST_NAME).protocol("openid-connect").build())); client_scope_default = KeycloakModelUtils.createClient(testRealm, "client-a"); client_scope_default.setDefaultClientScopes(Collections.singletonList(SCOPE_LAST_NAME)); - client_scope_default.setRedirectUris(Collections.singletonList("https://*")); + client_scope_default.setRedirectUris(Collections.singletonList("*")); client_scope_optional = KeycloakModelUtils.createClient(testRealm, "client-b"); client_scope_optional.setOptionalClientScopes(Collections.singletonList(SCOPE_LAST_NAME)); - client_scope_optional.setRedirectUris(Collections.singletonList("https://*")); + client_scope_optional.setRedirectUris(Collections.singletonList("*")); } diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/VerifyProfileTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/VerifyProfileTest.java index 1f35af8e04..5e05c16fe3 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/VerifyProfileTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/VerifyProfileTest.java @@ -42,6 +42,7 @@ import org.keycloak.representations.idm.RequiredActionProviderRepresentation; import org.keycloak.representations.idm.UserRepresentation; import org.keycloak.testsuite.AbstractTestRealmKeycloakTest; import org.keycloak.testsuite.AssertEvents; +import org.keycloak.testsuite.arquillian.annotation.AuthServerContainerExclude; import org.keycloak.testsuite.arquillian.annotation.EnableFeature; import org.keycloak.testsuite.arquillian.annotation.SetDefaultProvider; import org.keycloak.testsuite.pages.AppPage; @@ -63,6 +64,7 @@ import org.keycloak.userprofile.config.DeclarativeUserProfileProvider; @SetDefaultProvider(spi = UserProfileSpi.ID, providerId = DeclarativeUserProfileProvider.ID, beforeEnableFeature = false, onlyUpdateDefault = true) +@AuthServerContainerExclude(AuthServerContainerExclude.AuthServer.REMOTE) public class VerifyProfileTest extends AbstractTestRealmKeycloakTest { private static final String SCOPE_DEPARTMENT = "department"; @@ -127,10 +129,10 @@ public class VerifyProfileTest extends AbstractTestRealmKeycloakTest { testRealm.setClientScopes(Collections.singletonList(ClientScopeBuilder.create().name(SCOPE_DEPARTMENT).protocol("openid-connect").build())); client_scope_default = KeycloakModelUtils.createClient(testRealm, "client-a"); client_scope_default.setDefaultClientScopes(Collections.singletonList(SCOPE_DEPARTMENT)); - client_scope_default.setRedirectUris(Collections.singletonList("https://*")); + client_scope_default.setRedirectUris(Collections.singletonList("*")); client_scope_optional = KeycloakModelUtils.createClient(testRealm, "client-b"); client_scope_optional.setOptionalClientScopes(Collections.singletonList(SCOPE_DEPARTMENT)); - client_scope_optional.setRedirectUris(Collections.singletonList("https://*")); + client_scope_optional.setRedirectUris(Collections.singletonList("*")); } @Rule diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/user/profile/UserProfileTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/user/profile/UserProfileTest.java index 42ffda6552..b1cda6336a 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/user/profile/UserProfileTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/user/profile/UserProfileTest.java @@ -52,6 +52,7 @@ import org.keycloak.models.UserModel; import org.keycloak.representations.idm.ClientRepresentation; import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.services.messages.Messages; +import org.keycloak.testsuite.arquillian.annotation.AuthServerContainerExclude; import org.keycloak.testsuite.arquillian.annotation.EnableFeature; import org.keycloak.testsuite.arquillian.annotation.SetDefaultProvider; import org.keycloak.testsuite.runonserver.RunOnServer; @@ -81,6 +82,7 @@ import org.keycloak.validate.validators.LengthValidator; @SetDefaultProvider(spi = UserProfileSpi.ID, providerId = DeclarativeUserProfileProvider.ID, beforeEnableFeature = false, onlyUpdateDefault = true) +@AuthServerContainerExclude(AuthServerContainerExclude.AuthServer.REMOTE) public class UserProfileTest extends AbstractUserProfileTest { @Override