Environment variables for admin creation in testsuite

Closes #14102
This commit is contained in:
Martin Bartoš 2022-08-30 21:17:07 +02:00 committed by Pedro Igor
parent f6db484172
commit 677579fce6

View file

@ -183,6 +183,14 @@ public class KeycloakQuarkusServerDeployableContainer implements DeployableConta
builder.environment().put("JAVA_OPTS", javaOpts); builder.environment().put("JAVA_OPTS", javaOpts);
} }
final StoreProvider storeProvider = StoreProvider.getCurrentProvider();
final boolean isJpaStore = storeProvider.equals(StoreProvider.JPA) || storeProvider.equals(StoreProvider.LEGACY);
if (!isJpaStore) {
builder.environment().put("KEYCLOAK_ADMIN", "admin");
builder.environment().put("KEYCLOAK_ADMIN_PASSWORD", "admin");
}
if (restart.compareAndSet(false, true)) { if (restart.compareAndSet(false, true)) {
deleteDirectory(configuration.getProvidersPath().resolve("data")); deleteDirectory(configuration.getProvidersPath().resolve("data"));
} }