diff --git a/src/test/java/com/testcontainers/catalog/BaseIntegrationTest.java b/src/test/java/com/testcontainers/catalog/BaseIntegrationTest.java index 8944d4b..5bb47e7 100644 --- a/src/test/java/com/testcontainers/catalog/BaseIntegrationTest.java +++ b/src/test/java/com/testcontainers/catalog/BaseIntegrationTest.java @@ -11,6 +11,8 @@ import org.springframework.test.context.DynamicPropertySource; import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.PostgreSQLContainer; +import org.testcontainers.junit.jupiter.Container; +import org.testcontainers.junit.jupiter.Testcontainers; import org.testcontainers.utility.DockerImageName; @SpringBootTest( @@ -28,4 +30,5 @@ public abstract class BaseIntegrationTest { void setUpBase() { RestAssured.port = port; } + } \ No newline at end of file diff --git a/src/test/java/com/testcontainers/catalog/ContainersConfig.java b/src/test/java/com/testcontainers/catalog/ContainersConfig.java index c0e2570..c25a1ad 100644 --- a/src/test/java/com/testcontainers/catalog/ContainersConfig.java +++ b/src/test/java/com/testcontainers/catalog/ContainersConfig.java @@ -14,6 +14,7 @@ import org.testcontainers.containers.PostgreSQLContainer; import org.testcontainers.containers.localstack.LocalStackContainer; import org.testcontainers.elasticsearch.ElasticsearchContainer; +import org.testcontainers.utility.MountableFile; @TestConfiguration(proxyBeanMethods = false) public class ContainersConfig { @@ -21,7 +22,9 @@ public class ContainersConfig { @Bean @ServiceConnection PostgreSQLContainer postgresContainer() { - return new PostgreSQLContainer<>(parse("postgres:16-alpine")); + PostgreSQLContainer selfPostgreSQLContainer = new PostgreSQLContainer<>(parse("postgres:16-alpine")); + + return selfPostgreSQLContainer; } @Bean