From 677579fce6f333003069aa2ae6887ae0d624c5e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Barto=C5=A1?= Date: Tue, 30 Aug 2022 21:17:07 +0200 Subject: [PATCH] Environment variables for admin creation in testsuite Closes #14102 --- .../KeycloakQuarkusServerDeployableContainer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/KeycloakQuarkusServerDeployableContainer.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/KeycloakQuarkusServerDeployableContainer.java index 382c055a40..1b259d5b70 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/KeycloakQuarkusServerDeployableContainer.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/containers/KeycloakQuarkusServerDeployableContainer.java @@ -183,6 +183,14 @@ public class KeycloakQuarkusServerDeployableContainer implements DeployableConta 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)) { deleteDirectory(configuration.getProvidersPath().resolve("data")); }