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 {
63
63
implementation ' net.logstash.logback:logstash-logback-encoder:8.0'
64
64
65
65
// testcontainers
66
+ testImplementation ' org.springframework.boot:spring-boot-testcontainers'
66
67
testImplementation ' org.testcontainers:junit-jupiter'
67
68
testImplementation ' org.testcontainers:postgresql'
68
69
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
42
42
import org.springframework.web.reactive.function.client.WebClient
43
43
import org.testcontainers.containers.PostgreSQLContainer
44
44
import org.testcontainers.junit.jupiter.Container
45
- import org.testcontainers.junit.jupiter.Testcontainers
46
45
import reactor.core.publisher.Mono
47
46
import reactor.kotlin.core.publisher.toFlux
48
47
49
- @Testcontainers
50
48
@SpringBootTest(
51
49
classes = [SoftenoMvcJpaApp ::class ],
52
50
properties = [" spring.profiles.active=integration" ],
@@ -76,6 +74,8 @@ abstract class BaseIntegrationTest {
76
74
@JvmStatic
77
75
@DynamicPropertySource
78
76
fun registerDynamicProperties (registry : DynamicPropertyRegistry ) {
77
+ postgreSQLContainer.start()
78
+
79
79
registry.add(" spring.liquibase.url" ) {
80
80
" jdbc:postgresql://${postgreSQLContainer.host} :${postgreSQLContainer.firstMappedPort} /${postgreSQLContainer.databaseName} "
81
81
}
You can’t perform that action at this time.
0 commit comments