Revise Testcontainers examples based on feedback
Closes gh-29939
This commit is contained in:
parent
a2a676241c
commit
482482f62b
|
@ -2023,8 +2023,7 @@ properties.
|
||||||
|
|
||||||
@Container
|
@Container
|
||||||
static GenericContainer redis =
|
static GenericContainer redis =
|
||||||
new GenericContainer(DockerImageName.parse("redis:5.0.3-alpine"))
|
new GenericContainer("redis:5.0.3-alpine").withExposedPorts(6379);
|
||||||
.withExposedPorts(6379);
|
|
||||||
|
|
||||||
@DynamicPropertySource
|
@DynamicPropertySource
|
||||||
static void redisProperties(DynamicPropertyRegistry registry) {
|
static void redisProperties(DynamicPropertyRegistry registry) {
|
||||||
|
@ -2048,8 +2047,7 @@ properties.
|
||||||
@Container
|
@Container
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
val redis: GenericContainer =
|
val redis: GenericContainer =
|
||||||
GenericContainer(DockerImageName.parse("redis:5.0.3-alpine"))
|
GenericContainer("redis:5.0.3-alpine").withExposedPorts(6379)
|
||||||
.withExposedPorts(6379)
|
|
||||||
|
|
||||||
@DynamicPropertySource
|
@DynamicPropertySource
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
|
|
|
@ -71,8 +71,7 @@ import java.lang.annotation.Target;
|
||||||
*
|
*
|
||||||
* @Container
|
* @Container
|
||||||
* static GenericContainer redis =
|
* static GenericContainer redis =
|
||||||
* new GenericContainer(DockerImageName.parse("redis:5.0.3-alpine"))
|
* new GenericContainer("redis:5.0.3-alpine").withExposedPorts(6379);
|
||||||
* .withExposedPorts(6379);
|
|
||||||
*
|
*
|
||||||
* // ...
|
* // ...
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue