Polish "Use the container IP address for tests using TestContainer"
See gh-21480
This commit is contained in:
@@ -60,8 +60,8 @@ class DataRedisTestIntegrationTests {
|
||||
|
||||
@DynamicPropertySource
|
||||
static void redisProperties(DynamicPropertyRegistry registry) {
|
||||
registry.add("spring.redis.port", redis::getFirstMappedPort);
|
||||
registry.add("spring.redis.host", redis::getContainerIpAddress);
|
||||
registry.add("spring.redis.port", redis::getFirstMappedPort);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -46,6 +46,7 @@ class DataRedisTestPropertiesIntegrationTests {
|
||||
|
||||
@DynamicPropertySource
|
||||
static void redisProperties(DynamicPropertyRegistry registry) {
|
||||
registry.add("spring.redis.host", redis::getContainerIpAddress);
|
||||
registry.add("spring.redis.port", redis::getFirstMappedPort);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@ class DataRedisTestWithIncludeFilterIntegrationTests {
|
||||
|
||||
@DynamicPropertySource
|
||||
static void redisProperties(DynamicPropertyRegistry registry) {
|
||||
registry.add("spring.redis.port", redis::getFirstMappedPort);
|
||||
registry.add("spring.redis.host", redis::getContainerIpAddress);
|
||||
registry.add("spring.redis.port", redis::getFirstMappedPort);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user