Class PostgresTestConfiguration
java.lang.Object
com.irurueta.authserver.testsupport.PostgresTestConfiguration
Exposes a PostgreSQL Testcontainers container as a Spring Boot service connection, so the
DataSource (and Flyway) of a test context is wired to it automatically.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDocker image used for the PostgreSQL container (same major version ascompose.yaml). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.testcontainers.postgresql.PostgreSQLContainerCreates the PostgreSQL container.
-
Field Details
-
POSTGRES_IMAGE
Docker image used for the PostgreSQL container (same major version ascompose.yaml).- See Also:
-
-
Constructor Details
-
PostgresTestConfiguration
public PostgresTestConfiguration()
-
-
Method Details
-
postgresContainer
@Bean public org.testcontainers.postgresql.PostgreSQLContainer postgresContainer()Creates the PostgreSQL container.- Returns:
- the container, started and stopped by the Spring context lifecycle.
-