Skip to content

Commit

Permalink
handle default version
Browse files Browse the repository at this point in the history
  • Loading branch information
dasniko committed Apr 29, 2024
1 parent f7ac171 commit 4b4e5ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,9 @@ public Duration getStartupTimeout() {
return startupTimeout;
}

@SuppressWarnings({"ConstantValue", "UnreachableCode"})
public String getKeycloakDefaultVersion() {
return KEYCLOAK_VERSION;
return KEYCLOAK_VERSION.equals("nightly") ? "999.0.0-SNAPSHOT" : KEYCLOAK_VERSION;
}

private boolean isNotBlank(String s) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4b4e5ab

Please sign in to comment.