BAEL-6923: added comments about docker env
This commit is contained in:
parent
02a680c9d6
commit
4e77570581
|
@ -25,6 +25,8 @@ import com.baeldung.testcontainers.support.MiddleEarthCharactersRepository;
|
||||||
@Testcontainers
|
@Testcontainers
|
||||||
@SpringBootTest(webEnvironment = DEFINED_PORT)
|
@SpringBootTest(webEnvironment = DEFINED_PORT)
|
||||||
@DirtiesContext(classMode = AFTER_CLASS)
|
@DirtiesContext(classMode = AFTER_CLASS)
|
||||||
|
// Testcontainers require a valid docker installation.
|
||||||
|
// When running the tests, ensure you have a valid Docker environment
|
||||||
class DynamicPropertiesLiveTest {
|
class DynamicPropertiesLiveTest {
|
||||||
@Container
|
@Container
|
||||||
static MongoDBContainer mongoDBContainer = new MongoDBContainer(DockerImageName.parse("mongo:4.0.10"));
|
static MongoDBContainer mongoDBContainer = new MongoDBContainer(DockerImageName.parse("mongo:4.0.10"));
|
||||||
|
|
|
@ -8,6 +8,9 @@ import org.springframework.context.annotation.Bean;
|
||||||
import org.testcontainers.containers.MongoDBContainer;
|
import org.testcontainers.containers.MongoDBContainer;
|
||||||
import org.testcontainers.utility.DockerImageName;
|
import org.testcontainers.utility.DockerImageName;
|
||||||
|
|
||||||
|
|
||||||
|
// Testcontainers require a valid docker installation.
|
||||||
|
// When running the app locally, ensure you have a valid Docker environment
|
||||||
class LocalDevApplication {
|
class LocalDevApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -24,6 +24,8 @@ import com.baeldung.testcontainers.support.MiddleEarthCharactersRepository;
|
||||||
@Testcontainers
|
@Testcontainers
|
||||||
@SpringBootTest(webEnvironment = DEFINED_PORT)
|
@SpringBootTest(webEnvironment = DEFINED_PORT)
|
||||||
@DirtiesContext(classMode = AFTER_CLASS)
|
@DirtiesContext(classMode = AFTER_CLASS)
|
||||||
|
// Testcontainers require a valid docker installation.
|
||||||
|
// When running the tests, ensure you have a valid Docker environment
|
||||||
class ServiceConnectionLiveTest {
|
class ServiceConnectionLiveTest {
|
||||||
|
|
||||||
@Container
|
@Container
|
||||||
|
|
Loading…
Reference in New Issue