mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-27 20:49:34 +00:00
Add support for creating a container from a TestImage value
This commit improves TestImage so that an explicit image can trigger the creation of the container, with optional additional setup. This removes the need of creating additional container types for images that have multiple flavors, and to please the static method that can only create a container based on a single match. Closes gh-51082
This commit is contained in:
+1
-1
@@ -60,7 +60,7 @@ import static org.assertj.core.api.Assertions.entry;
|
||||
class SessionDataRedisAutoConfigurationTests extends AbstractSessionAutoConfigurationTests {
|
||||
|
||||
@Container
|
||||
public static RedisContainer redis = TestImage.container(RedisContainer.class);
|
||||
public static RedisContainer redis = TestImage.forContainer(RedisContainer.class);
|
||||
|
||||
@BeforeEach
|
||||
void prepareContextRunner() {
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ import static org.assertj.core.api.Assertions.entry;
|
||||
class SessionDataRedisReactiveAutoConfigurationTests extends AbstractSessionReactiveAutoConfigurationTests {
|
||||
|
||||
@Container
|
||||
public static RedisContainer redis = TestImage.container(RedisContainer.class);
|
||||
public static RedisContainer redis = TestImage.forContainer(RedisContainer.class);
|
||||
|
||||
@BeforeEach
|
||||
void prepareRunner() {
|
||||
|
||||
Reference in New Issue
Block a user