From 7f56c44ec1c3d971a2ca09d7f8d933768118d890 Mon Sep 17 00:00:00 2001 From: Sven-Torben Janus Date: Sun, 12 Dec 2021 15:36:09 +0100 Subject: [PATCH] test: Make tests run with latest changes to testcontainers-keycloak https://github.com/dasniko/testcontainers-keycloak/issues/10#issuecomment-991902555 --- .../keycloak/authorization/client/KeycloakXContainer.java | 4 ++-- .../de/sventorben/keycloak/authorization/client/LoginIT.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/de/sventorben/keycloak/authorization/client/KeycloakXContainer.java b/src/test/java/de/sventorben/keycloak/authorization/client/KeycloakXContainer.java index 704cc14..2236888 100755 --- a/src/test/java/de/sventorben/keycloak/authorization/client/KeycloakXContainer.java +++ b/src/test/java/de/sventorben/keycloak/authorization/client/KeycloakXContainer.java @@ -17,10 +17,10 @@ final class KeycloakXContainer extends KeycloakContainer { protected void configure() { super.configure(); if (providerClassLocation != null) { - createKeycloakExtensionDeployment("/opt/keycloak/providers", "providers.jar", providerClassLocation); + createKeycloakExtensionDeployment("/opt/jboss/keycloak/providers", "providers.jar", providerClassLocation); } List commandParts = new ArrayList<>(); - commandParts.add("start-dev"); + commandParts.add("--auto-config"); commandParts.add("--http-enabled=true"); this.setCommand(commandParts.toArray(new String[0])); } diff --git a/src/test/java/de/sventorben/keycloak/authorization/client/LoginIT.java b/src/test/java/de/sventorben/keycloak/authorization/client/LoginIT.java index d740e52..52bb8f8 100755 --- a/src/test/java/de/sventorben/keycloak/authorization/client/LoginIT.java +++ b/src/test/java/de/sventorben/keycloak/authorization/client/LoginIT.java @@ -60,7 +60,7 @@ class LoginIT { String fullImage = "quay.io/keycloak/" + dist + ":" + version; LOGGER.info("Running test with Keycloak image: " + fullImage); if ("keycloak-x".equalsIgnoreCase(dist) && - ("latest".equalsIgnoreCase(version) || Version.parse(version).compareTo(Version.parse("15.1")) >= 0)) { + !"latest".equalsIgnoreCase(version) && Version.parse(version).compareTo(Version.parse("15.1")) < 0) { return new KeycloakXContainer(fullImage); } return new KeycloakContainer(fullImage);