diff --git a/src/main/java/dasniko/testcontainers/keycloak/ExtendableKeycloakContainer.java b/src/main/java/dasniko/testcontainers/keycloak/ExtendableKeycloakContainer.java index 49aac5b..b89f861 100644 --- a/src/main/java/dasniko/testcontainers/keycloak/ExtendableKeycloakContainer.java +++ b/src/main/java/dasniko/testcontainers/keycloak/ExtendableKeycloakContainer.java @@ -508,7 +508,8 @@ public Duration getStartupTimeout() { } public String getKeycloakDefaultVersion() { - return KEYCLOAK_VERSION; + //noinspection ConstantValue + return KEYCLOAK_VERSION.equals("nightly") ? "999.0.0-SNAPSHOT" : KEYCLOAK_VERSION; } private boolean isNotBlank(String s) { diff --git a/src/test/java/dasniko/testcontainers/keycloak/KeycloakContainerTest.java b/src/test/java/dasniko/testcontainers/keycloak/KeycloakContainerTest.java index c52df24..4bffbe4 100644 --- a/src/test/java/dasniko/testcontainers/keycloak/KeycloakContainerTest.java +++ b/src/test/java/dasniko/testcontainers/keycloak/KeycloakContainerTest.java @@ -176,8 +176,7 @@ private void checkKeycloakContainerInternals(KeycloakContainer keycloak) { Keycloak keycloakAdminClient = keycloak.getKeycloakAdminClient(); ServerInfoRepresentation serverInfo = keycloakAdminClient.serverInfo().getInfo(); assertThat(serverInfo, notNullValue()); - assertThat(serverInfo.getSystemInfo().getVersion(), startsWith("999.0.0-SNAPSHOT")); -// assertThat(serverInfo.getSystemInfo().getVersion(), startsWith(keycloak.getKeycloakDefaultVersion())); + assertThat(serverInfo.getSystemInfo().getVersion(), startsWith(keycloak.getKeycloakDefaultVersion())); } private String getMetricsUrl(KeycloakContainer keycloak) {