Skip to content

Commit e71a666

Browse files
committed
feat: remove @testcontainers from PostgresIntegrationTest
1 parent ee42a39 commit e71a666

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,6 @@
194194
<artifactId>spring-boot-testcontainers</artifactId>
195195
<scope>test</scope>
196196
</dependency>
197-
<dependency>
198-
<groupId>org.testcontainers</groupId>
199-
<artifactId>junit-jupiter</artifactId>
200-
<version>1.18.3</version>
201-
<scope>test</scope>
202-
</dependency>
203197
</dependencies>
204198
<dependencyManagement>
205199
<dependencies>

src/test/java/com/itasocialacademy/oitassist/PostgresIntegrationTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
66
import org.springframework.test.context.ActiveProfiles;
77
import org.testcontainers.containers.PostgreSQLContainer;
8-
import org.testcontainers.junit.jupiter.Container;
9-
import org.testcontainers.junit.jupiter.Testcontainers;
108
import org.testcontainers.utility.DockerImageName;
119

12-
@Testcontainers
1310
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE)
1411
@ActiveProfiles("test")
1512
@Tag("integration")
1613
public abstract class PostgresIntegrationTest {
1714

18-
@Container
1915
@ServiceConnection
2016
static final PostgreSQLContainer<?> POSTGRES =
2117
new PostgreSQLContainer<>(DockerImageName.parse("postgres:16-alpine"));
18+
19+
static {
20+
POSTGRES.start();
21+
}
2222
}

0 commit comments

Comments
 (0)