test: Make tests run with latest changes to testcontainers-keycloak

https://github.com/dasniko/testcontainers-keycloak/issues/10#issuecomment-991902555
This commit is contained in:
Sven-Torben Janus 2021-12-12 15:36:09 +01:00
parent 65f25f5ab3
commit 7f56c44ec1
2 changed files with 3 additions and 3 deletions

View file

@ -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<String> commandParts = new ArrayList<>();
commandParts.add("start-dev");
commandParts.add("--auto-config");
commandParts.add("--http-enabled=true");
this.setCommand(commandParts.toArray(new String[0]));
}

View file

@ -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);