Skip to content

Commit

Permalink
latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shelajev committed Mar 20, 2024
1 parent 655fb4f commit 4d4ddba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -28,4 +30,5 @@ public abstract class BaseIntegrationTest {
void setUpBase() {
RestAssured.port = port;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@
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 {

@Bean
@ServiceConnection
PostgreSQLContainer<?> postgresContainer() {
return new PostgreSQLContainer<>(parse("postgres:16-alpine"));
PostgreSQLContainer<?> selfPostgreSQLContainer = new PostgreSQLContainer<>(parse("postgres:16-alpine"));

return selfPostgreSQLContainer;
}

@Bean
Expand Down

0 comments on commit 4d4ddba

Please sign in to comment.