parent
5257b5fb54
commit
143e6bc932
4 changed files with 41 additions and 7 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -137,7 +137,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
server: ['quarkus', 'undertow-map', 'wildfly', 'undertow-map-hot-rod']
|
server: ['quarkus', 'quarkus-map', 'wildfly', 'undertow-map-hot-rod']
|
||||||
tests: ['group1','group2','group3']
|
tests: ['group1','group2','group3']
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
|
@ -183,7 +183,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
declare -A PARAMS TESTGROUP
|
declare -A PARAMS TESTGROUP
|
||||||
PARAMS["quarkus"]="-Pauth-server-quarkus"
|
PARAMS["quarkus"]="-Pauth-server-quarkus"
|
||||||
PARAMS["undertow-map"]="-Pauth-server-undertow -Pmap-storage -Dpageload.timeout=90000"
|
PARAMS["quarkus-map"]="-Pauth-server-quarkus -Pmap-storage -Dpageload.timeout=90000"
|
||||||
PARAMS["undertow-map-hot-rod"]="-Pauth-server-undertow -Pmap-storage,map-storage-hot-rod -Dpageload.timeout=90000"
|
PARAMS["undertow-map-hot-rod"]="-Pauth-server-undertow -Pmap-storage,map-storage-hot-rod -Dpageload.timeout=90000"
|
||||||
PARAMS["wildfly"]="-Pauth-server-wildfly"
|
PARAMS["wildfly"]="-Pauth-server-wildfly"
|
||||||
TESTGROUP["group1"]="-Dtest=!**.crossdc.**,!**.cluster.**,%regex[org.keycloak.testsuite.(a[abc]|ad[a-l]|[^a-q]).*]" # Tests alphabetically before admin tests and those after "r"
|
TESTGROUP["group1"]="-Dtest=!**.crossdc.**,!**.cluster.**,%regex[org.keycloak.testsuite.(a[abc]|ad[a-l]|[^a-q]).*]" # Tests alphabetically before admin tests and those after "r"
|
||||||
|
|
|
@ -856,6 +856,7 @@
|
||||||
<keycloak.publicKeyCache.enabled>false</keycloak.publicKeyCache.enabled>
|
<keycloak.publicKeyCache.enabled>false</keycloak.publicKeyCache.enabled>
|
||||||
<keycloak.userSessionPersister.provider></keycloak.userSessionPersister.provider>
|
<keycloak.userSessionPersister.provider></keycloak.userSessionPersister.provider>
|
||||||
<keycloak.userFederatedStorage.provider></keycloak.userFederatedStorage.provider>
|
<keycloak.userFederatedStorage.provider></keycloak.userFederatedStorage.provider>
|
||||||
|
<auth.server.quarkus.mapStorage.profile.config>chm</auth.server.quarkus.mapStorage.profile.config>
|
||||||
</systemPropertyVariables>
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -904,6 +905,7 @@
|
||||||
<keycloak.singleUseObject.map.storage.provider>jpa</keycloak.singleUseObject.map.storage.provider>
|
<keycloak.singleUseObject.map.storage.provider>jpa</keycloak.singleUseObject.map.storage.provider>
|
||||||
<keycloak.user.map.storage.provider>jpa</keycloak.user.map.storage.provider>
|
<keycloak.user.map.storage.provider>jpa</keycloak.user.map.storage.provider>
|
||||||
<keycloak.userSession.map.storage.provider>jpa</keycloak.userSession.map.storage.provider>
|
<keycloak.userSession.map.storage.provider>jpa</keycloak.userSession.map.storage.provider>
|
||||||
|
<auth.server.quarkus.mapStorage.profile.config>jpa</auth.server.quarkus.mapStorage.profile.config>
|
||||||
</systemPropertyVariables>
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -47,6 +47,8 @@ import org.keycloak.testsuite.arquillian.SuiteContext;
|
||||||
*/
|
*/
|
||||||
public class KeycloakQuarkusServerDeployableContainer implements DeployableContainer<KeycloakQuarkusConfiguration> {
|
public class KeycloakQuarkusServerDeployableContainer implements DeployableContainer<KeycloakQuarkusConfiguration> {
|
||||||
|
|
||||||
|
private static final String AUTH_SERVER_QUARKUS_MAP_STORAGE_PROFILE = "auth.server.quarkus.mapStorage.profile";
|
||||||
|
|
||||||
private static final Logger log = Logger.getLogger(KeycloakQuarkusServerDeployableContainer.class);
|
private static final Logger log = Logger.getLogger(KeycloakQuarkusServerDeployableContainer.class);
|
||||||
|
|
||||||
private KeycloakQuarkusConfiguration configuration;
|
private KeycloakQuarkusConfiguration configuration;
|
||||||
|
@ -196,25 +198,54 @@ public class KeycloakQuarkusServerDeployableContainer implements DeployableConta
|
||||||
commands.add("-Djboss.node.name=" + configuration.getRoute());
|
commands.add("-Djboss.node.name=" + configuration.getRoute());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String mapStorageProfile = System.getProperty(AUTH_SERVER_QUARKUS_MAP_STORAGE_PROFILE);
|
||||||
// only run build during restarts or when running cluster tests
|
// only run build during restarts or when running cluster tests
|
||||||
|
|
||||||
if (restart.get() || "ha".equals(System.getProperty("auth.server.quarkus.cluster.config"))) {
|
if (restart.get() || "ha".equals(System.getProperty("auth.server.quarkus.cluster.config"))) {
|
||||||
commands.removeIf("--optimized"::equals);
|
commands.removeIf("--optimized"::equals);
|
||||||
commands.add("--http-relative-path=/auth");
|
commands.add("--http-relative-path=/auth");
|
||||||
|
|
||||||
String cacheMode = System.getProperty("auth.server.quarkus.cluster.config", "local");
|
if (mapStorageProfile == null) {
|
||||||
|
String cacheMode = System.getProperty("auth.server.quarkus.cluster.config", "local");
|
||||||
|
|
||||||
if ("local".equals(cacheMode)) {
|
if ("local".equals(cacheMode)) {
|
||||||
commands.add("--cache=local");
|
commands.add("--cache=local");
|
||||||
} else {
|
} else {
|
||||||
commands.add("--cache-config-file=cluster-" + cacheMode + ".xml");
|
commands.add("--cache-config-file=cluster-" + cacheMode + ".xml");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addStorageOptions(commands);
|
||||||
|
|
||||||
commands.addAll(getAdditionalBuildArgs());
|
commands.addAll(getAdditionalBuildArgs());
|
||||||
|
|
||||||
|
log.debugf("Quarkus parameters: %s", commands);
|
||||||
|
|
||||||
return commands.toArray(new String[0]);
|
return commands.toArray(new String[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void addStorageOptions(List<String> commands) {
|
||||||
|
String mapStorageProfile = System.getProperty(AUTH_SERVER_QUARKUS_MAP_STORAGE_PROFILE);
|
||||||
|
|
||||||
|
if (mapStorageProfile != null) {
|
||||||
|
switch (mapStorageProfile) {
|
||||||
|
case "chm":
|
||||||
|
commands.add("--storage=" + mapStorageProfile);
|
||||||
|
break;
|
||||||
|
case "jpa":
|
||||||
|
commands.add("--storage=" + mapStorageProfile);
|
||||||
|
commands.add("--db-username=" + System.getProperty("keycloak.map.storage.connectionsJpa.url"));
|
||||||
|
commands.add("--db-password=" + System.getProperty("keycloak.map.storage.connectionsJpa.user"));
|
||||||
|
commands.add("--db-url=" + System.getProperty("keycloak.map.storage.connectionsJpa.password"));
|
||||||
|
case "hotrod":
|
||||||
|
commands.add("--storage=" + mapStorageProfile);
|
||||||
|
// TODO: URL / username / password
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void waitForReadiness() throws MalformedURLException, LifecycleException {
|
private void waitForReadiness() throws MalformedURLException, LifecycleException {
|
||||||
SuiteContext suiteContext = this.suiteContext.get();
|
SuiteContext suiteContext = this.suiteContext.get();
|
||||||
//TODO: not sure if the best endpoint but it makes sure that everything is properly initialized. Once we have
|
//TODO: not sure if the best endpoint but it makes sure that everything is properly initialized. Once we have
|
||||||
|
|
|
@ -1437,6 +1437,7 @@
|
||||||
<hotrod.store.enabled>true</hotrod.store.enabled>
|
<hotrod.store.enabled>true</hotrod.store.enabled>
|
||||||
<skip.copy.hotrod.server>false</skip.copy.hotrod.server>
|
<skip.copy.hotrod.server>false</skip.copy.hotrod.server>
|
||||||
<cache.server>infinispan</cache.server>
|
<cache.server>infinispan</cache.server>
|
||||||
|
<auth.server.quarkus.mapStorage.profile.config>hotrod</auth.server.quarkus.mapStorage.profile.config>
|
||||||
</properties>
|
</properties>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
Loading…
Reference in a new issue