KEYCLOAK-11729: ExtendingThemeTest is failing with auth-server-wildfly (#6410)

This commit is contained in:
Martin Bartoš 2019-11-04 11:27:03 +01:00 committed by Marek Posolda
parent a6e8232b31
commit e3d755fe9d
3 changed files with 36 additions and 2 deletions

View file

@ -67,6 +67,9 @@
<session.cache.owners>1</session.cache.owners> <session.cache.owners>1</session.cache.owners>
<offline.session.cache.owners>1</offline.session.cache.owners> <offline.session.cache.owners>1</offline.session.cache.owners>
<login.failure.cache.owners>1</login.failure.cache.owners> <login.failure.cache.owners>1</login.failure.cache.owners>
<!-- Path to testsuite/test resources : Themes-->
<keycloak.base.test.resource>${project.parent.basedir}/../../../tests/base/src/test/resources</keycloak.base.test.resource>
</properties> </properties>
<profiles> <profiles>
@ -153,6 +156,21 @@
<plugin> <plugin>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<executions> <executions>
<execution>
<id>add-extending-theme</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${auth.server.home}/themes</outputDirectory>
<resources>
<resource>
<directory>${keycloak.base.test.resource}/theme</directory>
</resource>
</resources>
</configuration>
</execution>
<execution> <execution>
<id>enable-jboss-mgmt-admin</id> <id>enable-jboss-mgmt-admin</id>
<phase>process-resources</phase> <phase>process-resources</phase>

View file

@ -1,16 +1,23 @@
package org.keycloak.testsuite.theme; package org.keycloak.testsuite.theme;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.test.api.TargetsContainer;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.keycloak.representations.idm.RealmRepresentation; import org.keycloak.representations.idm.RealmRepresentation;
import org.keycloak.testsuite.AbstractKeycloakTest; import org.keycloak.testsuite.AbstractKeycloakTest;
import org.keycloak.testsuite.runonserver.RunOnServerDeployment;
import org.keycloak.testsuite.util.ContainerAssume;
import org.keycloak.theme.Theme; import org.keycloak.theme.Theme;
import org.keycloak.theme.ThemeProvider; import org.keycloak.theme.ThemeProvider;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
import static org.keycloak.testsuite.arquillian.DeploymentTargetModifier.AUTH_SERVER_CURRENT;
/** /**
* @author <a href="mailto:vincent.letarouilly@gmail.com">Vincent Letarouilly</a> * @author <a href="mailto:vincent.letarouilly@gmail.com">Vincent Letarouilly</a>
*/ */
@ -18,9 +25,16 @@ public class ExtendingThemeTest extends AbstractKeycloakTest {
private static final String THEME_NAME = "environment-agnostic"; private static final String THEME_NAME = "environment-agnostic";
@Deployment
@TargetsContainer(AUTH_SERVER_CURRENT)
public static WebArchive deploy() {
return RunOnServerDeployment.create(ExtendingThemeTest.class)
.addPackages(true, "org.keycloak.testsuite");
}
@Before @Before
public void setUp() { public void setUp() {
System.setProperty("existing_system_property", "Keycloak is awesome"); testingClient.server().run(session -> System.setProperty("existing_system_property", "Keycloak is awesome"));
} }
@Override @Override
@ -30,6 +44,8 @@ public class ExtendingThemeTest extends AbstractKeycloakTest {
// KEYCLOAK-6698 // KEYCLOAK-6698
@Test @Test
public void systemPropertiesSubstitutionInThemeProperties() { public void systemPropertiesSubstitutionInThemeProperties() {
// TODO fix this test on auth-server-wildfly. There is an issue with setup of System properties (other JVM).
ContainerAssume.assumeAuthServerUndertow();
testingClient.server().run(session -> { testingClient.server().run(session -> {
try { try {
ThemeProvider extending = session.getProvider(ThemeProvider.class, "extending"); ThemeProvider extending = session.getProvider(ThemeProvider.class, "extending");

View file

@ -87,7 +87,7 @@ if [ $1 == "server-group3" ]; then
fi fi
if [ $1 == "server-group4" ]; then if [ $1 == "server-group4" ]; then
run-server-tests org.keycloak.testsuite.k*.**.*Test,org.keycloak.testsuite.m*.**.*Test,org.keycloak.testsuite.o*.**.*Test,org.keycloak.testsuite.s*.**.*Test,org.keycloak.testsuite.u*.**.*Test run-server-tests org.keycloak.testsuite.k*.**.*Test,org.keycloak.testsuite.m*.**.*Test,org.keycloak.testsuite.o*.**.*Test,org.keycloak.testsuite.s*.**.*Test,org.keycloak.testsuite.t*.**.*Test,org.keycloak.testsuite.u*.**.*Test
fi fi
if [ $1 == "adapter-tests" ]; then if [ $1 == "adapter-tests" ]; then