File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
test/kotlin/com/softeno/template/app Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ dependencies {
6363 implementation ' net.logstash.logback:logstash-logback-encoder:8.0'
6464
6565 // testcontainers
66+ testImplementation ' org.springframework.boot:spring-boot-testcontainers'
6667 testImplementation ' org.testcontainers:junit-jupiter'
6768 testImplementation ' org.testcontainers:postgresql'
6869 testImplementation ' org.testcontainers:r2dbc'
Original file line number Diff line number Diff line change 1- spring.main.allow-bean-definition-overriding =false
1+ spring.main.allow-bean-definition-overriding =true
Original file line number Diff line number Diff line change @@ -42,11 +42,9 @@ import org.springframework.web.reactive.function.BodyInserters
4242import org.springframework.web.reactive.function.client.WebClient
4343import org.testcontainers.containers.PostgreSQLContainer
4444import org.testcontainers.junit.jupiter.Container
45- import org.testcontainers.junit.jupiter.Testcontainers
4645import reactor.core.publisher.Mono
4746import reactor.kotlin.core.publisher.toFlux
4847
49- @Testcontainers
5048@SpringBootTest(
5149 classes = [SoftenoMvcJpaApp ::class ],
5250 properties = [" spring.profiles.active=integration" ],
@@ -76,6 +74,8 @@ abstract class BaseIntegrationTest {
7674 @JvmStatic
7775 @DynamicPropertySource
7876 fun registerDynamicProperties (registry : DynamicPropertyRegistry ) {
77+ postgreSQLContainer.start()
78+
7979 registry.add(" spring.liquibase.url" ) {
8080 " jdbc:postgresql://${postgreSQLContainer.host} :${postgreSQLContainer.firstMappedPort} /${postgreSQLContainer.databaseName} "
8181 }
You can’t perform that action at this time.
0 commit comments