Use the container IP address for tests using TestContainer
See gh-21480
This commit is contained in:
committed by
Stephane Nicoll
parent
afcb5d54b2
commit
0c2bf70bb8
@@ -61,6 +61,7 @@ class DataRedisTestIntegrationTests {
|
||||
@DynamicPropertySource
|
||||
static void redisProperties(DynamicPropertyRegistry registry) {
|
||||
registry.add("spring.redis.port", redis::getFirstMappedPort);
|
||||
registry.add("spring.redis.host", redis::getContainerIpAddress);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -50,6 +50,7 @@ class DataRedisTestWithIncludeFilterIntegrationTests {
|
||||
@DynamicPropertySource
|
||||
static void redisProperties(DynamicPropertyRegistry registry) {
|
||||
registry.add("spring.redis.port", redis::getFirstMappedPort);
|
||||
registry.add("spring.redis.host", redis::getContainerIpAddress);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user