From cb3954fc7bfa5662a339d6bdf29ba9d74c96ff7b Mon Sep 17 00:00:00 2001 From: Steven Hawkins Date: Fri, 4 Oct 2024 12:59:55 -0400 Subject: [PATCH] fix: ensuring placeholders can be used with --import-realm (#33589) closes: #33578 Signed-off-by: Steve Hawkins --- .../src/test/java/org/keycloak/it/cli/dist/ImportDistTest.java | 1 - .../tests/integration/src/test/resources/quickstart-realm.json | 2 +- .../java/org/keycloak/exportimport/ExportImportManager.java | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/ImportDistTest.java b/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/ImportDistTest.java index 0a32a8d5a4..4a1cb31181 100644 --- a/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/ImportDistTest.java +++ b/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/ImportDistTest.java @@ -26,7 +26,6 @@ import org.junit.jupiter.api.TestMethodOrder; import org.keycloak.it.junit5.extension.CLIResult; import org.keycloak.it.junit5.extension.DistributionTest; import org.keycloak.it.junit5.extension.RawDistOnly; -import org.keycloak.it.junit5.extension.WithEnvVars; import org.keycloak.it.utils.KeycloakDistribution; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/quarkus/tests/integration/src/test/resources/quickstart-realm.json b/quarkus/tests/integration/src/test/resources/quickstart-realm.json index 95fbaa5c78..2582260b3f 100644 --- a/quarkus/tests/integration/src/test/resources/quickstart-realm.json +++ b/quarkus/tests/integration/src/test/resources/quickstart-realm.json @@ -1,6 +1,6 @@ { "realm": "quickstart-realm", - "enabled": true, + "enabled": ${TEST_REALM_ENABLED:true}, "accessTokenLifespan": 60, "accessCodeLifespan": 60, "accessCodeLifespanUserAction": 300, diff --git a/services/src/main/java/org/keycloak/exportimport/ExportImportManager.java b/services/src/main/java/org/keycloak/exportimport/ExportImportManager.java index cadf625f80..1fc0a9fa81 100644 --- a/services/src/main/java/org/keycloak/exportimport/ExportImportManager.java +++ b/services/src/main/java/org/keycloak/exportimport/ExportImportManager.java @@ -95,6 +95,7 @@ public class ExportImportManager { if (dir == null) { throw new IllegalStateException("Import not enabled"); } + ExportImportConfig.setReplacePlaceholders(true); return getStartupImportProviders(dir).map(Supplier::get).anyMatch(provider -> { try {