keycloak-uncached
Changes
testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/AuthServerTestEnricher.java 2(+1 -1)
Details
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 23de410..984ba7d 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
@@ -183,7 +183,7 @@ public class AuthServerTestEnricher {
}
public void checkServerLogs(@Observes(precedence = -1) BeforeSuite event) throws IOException, InterruptedException {
- boolean checkLog = System.getProperty("auth.server.log.check", "true").equals("true");
+ boolean checkLog = Boolean.parseBoolean(System.getProperty("auth.server.log.check", "true"));
if (checkLog && suiteContext.getAuthServerInfo().isJBossBased()) {
String jbossHomePath = suiteContext.getAuthServerInfo().getProperties().get("jbossHome");
LogChecker.checkJBossServerLog(jbossHomePath);
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 b2a7bb1..6ccaea4 100644
--- a/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml
+++ b/testsuite/integration-arquillian/tests/base/src/test/resources/arquillian.xml
@@ -59,7 +59,7 @@
<property name="enabled">${auth.server.jboss}</property>
<property name="adapterImplClass">org.jboss.as.arquillian.container.managed.ManagedDeployableContainer</property>
<property name="jbossHome">${auth.server.home}</property>
- <property name="serverConfig">standalone.xml</property>
+ <property name="serverConfig">${auth.server.config}</property>
<property name="jbossArguments">
-Djboss.socket.binding.port-offset=${auth.server.port.offset}
-Djboss.bind.address=0.0.0.0
diff --git a/testsuite/integration-arquillian/tests/other/clean-start/pom.xml b/testsuite/integration-arquillian/tests/other/clean-start/pom.xml
new file mode 100644
index 0000000..43b636b
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/clean-start/pom.xml
@@ -0,0 +1,69 @@
+<?xml version="1.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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.keycloak.testsuite</groupId>
+ <artifactId>integration-arquillian-tests-other</artifactId>
+ <version>1.9.5.Final-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>integration-arquillian-tests-smoke-clean-start</artifactId>
+
+ <name>Clean Start Tests</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>enforce-auth-server</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireProperty>
+ <property>auth.server</property>
+ <regex>(wildfly)|(eap)</regex>
+ <regexMessage>Tests require activation of profile "auth-server-wildfly" or "auth-server-eap".</regexMessage>
+ </requireProperty>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>standalone</id>
+ </profile>
+ <profile>
+ <id>standalone-ha</id>
+ <properties>
+ <auth.server.config>standalone-ha.xml</auth.server.config>
+ </properties>
+ </profile>
+ </profiles>
+</project>
\ No newline at end of file
diff --git a/testsuite/integration-arquillian/tests/other/clean-start/src/test/java/org/keycloak/testsuite/clean/start/CleanStartTest.java b/testsuite/integration-arquillian/tests/other/clean-start/src/test/java/org/keycloak/testsuite/clean/start/CleanStartTest.java
new file mode 100644
index 0000000..31b230f
--- /dev/null
+++ b/testsuite/integration-arquillian/tests/other/clean-start/src/test/java/org/keycloak/testsuite/clean/start/CleanStartTest.java
@@ -0,0 +1,42 @@
+/*
+ * 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.clean.start;
+
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import static org.junit.Assert.assertTrue;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * @author <a href="mailto:vramik@redhat.com">Vlastislav Ramik</a>
+ */
+@RunWith(Arquillian.class)
+@RunAsClient
+public class CleanStartTest {
+
+
+ @Test
+ public void cleanStartTest() {
+ //empty test - container is started via arquillian and logs are checked
+ //by org.keycloak.testsuite.arquillian.AuthServerTestEnricher#checkServerLogs
+
+ //verify that checkServerLogs is not skipped
+ assertTrue("checkServerLogs is skipped.", Boolean.parseBoolean(System.getProperty("auth.server.log.check", "true")));
+ }
+}
\ No newline at end of file
diff --git a/testsuite/integration-arquillian/tests/pom.xml b/testsuite/integration-arquillian/tests/pom.xml
index dda6341..5241b52 100755
--- a/testsuite/integration-arquillian/tests/pom.xml
+++ b/testsuite/integration-arquillian/tests/pom.xml
@@ -154,6 +154,7 @@
<auth.server.ssl.required>${auth.server.ssl.required}</auth.server.ssl.required>
<auth.server.jboss.startup.timeout>${auth.server.jboss.startup.timeout}</auth.server.jboss.startup.timeout>
<auth.server.config.dir>${auth.server.config.dir}</auth.server.config.dir>
+ <auth.server.config>${auth.server.config}</auth.server.config>
<frontend.console.output>${frontend.console.output}</frontend.console.output>
<backends.console.output>${backend.console.output}</backends.console.output>
@@ -193,7 +194,6 @@
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-remote</artifactId>
- <version>${arquillian-wildfly-container.version}</version>
</dependency>
</dependencies>
</profile>
@@ -204,6 +204,7 @@
<auth.server>wildfly</auth.server>
<auth.server.jboss>true</auth.server.jboss>
<auth.server.undertow>false</auth.server.undertow>
+ <auth.server.config>standalone.xml</auth.server.config>
<auth.server.config.dir>${auth.server.home}/standalone/configuration</auth.server.config.dir>
<h2.version>1.3.173</h2.version>
</properties>
@@ -221,6 +222,7 @@
<auth.server>eap</auth.server>
<auth.server.jboss>true</auth.server.jboss>
<auth.server.undertow>false</auth.server.undertow>
+ <auth.server.config>standalone.xml</auth.server.config>
<auth.server.config.dir>${auth.server.home}/standalone/configuration</auth.server.config.dir>
<h2.version>1.3.173</h2.version>
</properties>