mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-09 10:59:11 +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
@@ -47,7 +47,7 @@ class OracleFreeR2dbcContainerConnectionDetailsFactoryIntegrationTests {
|
||||
|
||||
@Container
|
||||
@ServiceConnection
|
||||
static final OracleContainer oracle = TestImage.container(OracleContainer.class);
|
||||
static final OracleContainer oracle = TestImage.forContainer(OracleContainer.class);
|
||||
|
||||
@Autowired
|
||||
ConnectionFactory connectionFactory;
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ class OracleXeR2dbcContainerConnectionDetailsFactoryIntegrationTests {
|
||||
|
||||
@Container
|
||||
@ServiceConnection
|
||||
static final OracleContainer oracle = TestImage.container(OracleContainer.class);
|
||||
static final OracleContainer oracle = TestImage.forContainer(OracleContainer.class);
|
||||
|
||||
@Autowired
|
||||
ConnectionFactory connectionFactory;
|
||||
|
||||
Reference in New Issue
Block a user