Skip to content

Commit a571604

Browse files
✨ feat(tests): introduce @Profile("axonserver") for AxonServer test container configuration
1 parent 9ca2722 commit a571604

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/test/java/com/dddheroes/heroesofddd/TestcontainersConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import org.springframework.boot.test.context.TestConfiguration;
55
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
66
import org.springframework.context.annotation.Bean;
7+
import org.springframework.context.annotation.Profile;
78
import org.testcontainers.containers.PostgreSQLContainer;
89

910
@TestConfiguration(proxyBeanMethods = false)
@@ -15,6 +16,7 @@ PostgreSQLContainer<?> postgresContainer() {
1516
return new PostgreSQLContainer<>("postgres:latest");
1617
}
1718

19+
@Profile("axonserver")
1820
@Bean
1921
@ServiceConnection
2022
AxonServerContainer axonServerContainer() {

0 commit comments

Comments
 (0)