public class DockerComposeContainer<SELF extends DockerComposeContainer<SELF>> extends FailureDetectingExternalResource
Constructor and Description |
---|
DockerComposeContainer(File... composeFiles) |
DockerComposeContainer(File composeFile,
String identifier)
Deprecated.
|
DockerComposeContainer(List<File> composeFiles) |
DockerComposeContainer(String identifier,
File... composeFiles) |
DockerComposeContainer(String identifier,
List<File> composeFiles) |
Modifier and Type | Method and Description |
---|---|
void |
finished(org.junit.runner.Description description) |
String |
getServiceHost(String serviceName,
Integer servicePort)
Get the host (e.g.
|
Integer |
getServicePort(String serviceName,
Integer servicePort)
Get the port that an exposed service can be found at, from the host machine
(i.e.
|
void |
starting(org.junit.runner.Description description) |
SELF |
withEnv(Map<String,String> env) |
SELF |
withEnv(String key,
String value) |
SELF |
withExposedService(String serviceName,
int servicePort) |
DockerComposeContainer |
withExposedService(String serviceName,
int instance,
int servicePort) |
SELF |
withLocalCompose(boolean localCompose)
Use a local Docker Compose binary instead of a container.
|
SELF |
withPull(boolean pull)
Whether to pull images first.
|
SELF |
withScaledService(String serviceBaseName,
int numInstances) |
SELF |
withTailChildContainers(boolean tailChildContainers)
Whether to tail child container logs.
|
apply, failed, succeeded
@Deprecated public DockerComposeContainer(File composeFile, String identifier)
public DockerComposeContainer(File... composeFiles)
public void starting(org.junit.runner.Description description)
starting
in class FailureDetectingExternalResource
public void finished(org.junit.runner.Description description)
finished
in class FailureDetectingExternalResource
public DockerComposeContainer withExposedService(String serviceName, int instance, int servicePort)
public String getServiceHost(String serviceName, Integer servicePort)
The service must have been declared using DockerComposeContainer#withExposedService.
serviceName
- the name of the service as set in the docker-compose.yml file.servicePort
- the port exposed by the service container.public Integer getServicePort(String serviceName, Integer servicePort)
The service must have been declared using DockerComposeContainer#withExposedService.
serviceName
- the name of the service as set in the docker-compose.yml file.servicePort
- the port exposed by the service container.public SELF withLocalCompose(boolean localCompose)
public SELF withPull(boolean pull)
public SELF withTailChildContainers(boolean tailChildContainers)
Copyright © 2017. All rights reserved.