Use different Postgres image in Testcontainers. Upgraded Testcontainers dependency to 1.17.5.
This commit is contained in:
parent
17bf092da6
commit
88bc5e2307
3 changed files with 5 additions and 3 deletions
2
pom.xml
2
pom.xml
|
@ -167,7 +167,7 @@
|
|||
https://issues.redhat.com/browse/KEYCLOAK-17585?focusedCommentId=16002705&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16002705
|
||||
-->
|
||||
<microprofile-metrics-api.version>2.3</microprofile-metrics-api.version>
|
||||
<testcontainers.version>1.16.3</testcontainers.version>
|
||||
<testcontainers.version>1.17.5</testcontainers.version>
|
||||
|
||||
<!-- Maven Plugins -->
|
||||
<replacer.plugin.version>1.3.5</replacer.plugin.version>
|
||||
|
|
|
@ -20,12 +20,13 @@ import org.jboss.arquillian.container.spi.event.StartSuiteContainers;
|
|||
import org.jboss.arquillian.core.api.annotation.Observes;
|
||||
import org.jboss.arquillian.test.spi.event.suite.AfterSuite;
|
||||
import org.testcontainers.containers.PostgreSQLContainer;
|
||||
import org.testcontainers.utility.DockerImageName;
|
||||
|
||||
public class PostgresContainerTestEnricher {
|
||||
|
||||
private static final Boolean START_CONTAINER = Boolean.valueOf(System.getProperty("postgres.start-container", "false"));
|
||||
private static final String POSTGRES_DOCKER_IMAGE_NAME = System.getProperty("keycloak.map.storage.postgres.docker.image", "postgres:alpine");
|
||||
private static final PostgreSQLContainer POSTGRES_CONTAINER = new PostgreSQLContainer(POSTGRES_DOCKER_IMAGE_NAME);
|
||||
private static final PostgreSQLContainer POSTGRES_CONTAINER = new PostgreSQLContainer(DockerImageName.parse(POSTGRES_DOCKER_IMAGE_NAME).asCompatibleSubstituteFor("postgres"));
|
||||
private static final String POSTGRES_DB_USER = System.getProperty("keycloak.map.storage.connectionsJpa.user", "keycloak");
|
||||
private static final String POSTGRES_DB_PASSWORD = System.getProperty("keycloak.map.storage.connectionsJpa.password", "pass");
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ import org.keycloak.sessions.AuthenticationSessionSpi;
|
|||
import org.keycloak.testsuite.model.Config;
|
||||
import org.keycloak.testsuite.model.KeycloakModelParameters;
|
||||
import org.testcontainers.containers.PostgreSQLContainer;
|
||||
import org.testcontainers.utility.DockerImageName;
|
||||
|
||||
public class JpaMapStorage extends KeycloakModelParameters {
|
||||
|
||||
|
@ -59,7 +60,7 @@ public class JpaMapStorage extends KeycloakModelParameters {
|
|||
|
||||
private static final Boolean START_CONTAINER = Boolean.valueOf(System.getProperty("postgres.start-container", "true"));
|
||||
private static final String POSTGRES_DOCKER_IMAGE_NAME = System.getProperty("keycloak.map.storage.postgres.docker.image", "postgres:alpine");
|
||||
private static final PostgreSQLContainer POSTGRES_CONTAINER = new PostgreSQLContainer(POSTGRES_DOCKER_IMAGE_NAME);
|
||||
private static final PostgreSQLContainer POSTGRES_CONTAINER = new PostgreSQLContainer(DockerImageName.parse(POSTGRES_DOCKER_IMAGE_NAME).asCompatibleSubstituteFor("postgres"));
|
||||
private static final String POSTGRES_DB_DEFAULT_NAME = System.getProperty("keycloak.map.storage.connectionsJpa.databaseName", "keycloak");
|
||||
private static final String POSTGRES_DB_USER = System.getProperty("keycloak.map.storage.connectionsJpa.user", "keycloak");
|
||||
private static final String POSTGRES_DB_PASSWORD = System.getProperty("keycloak.map.storage.connectionsJpa.password", "pass");
|
||||
|
|
Loading…
Reference in a new issue