use of io.fabric8.maven.docker.config.HealthCheckConfiguration in project docker-maven-plugin by fabric8io.
the class DockerFileBuilderTest method testHealthCheckNone.
@Test
public void testHealthCheckNone() {
HealthCheckConfiguration hc = new HealthCheckConfiguration.Builder().mode(HealthCheckMode.none).build();
String dockerfileContent = new DockerFileBuilder().healthCheck(hc).content();
assertThat(dockerfileToMap(dockerfileContent), hasEntry("HEALTHCHECK", "NONE"));
}
use of io.fabric8.maven.docker.config.HealthCheckConfiguration in project docker-maven-plugin by fabric8io.
the class DockerFileBuilderTest method testHealthCheckCmdParams.
@Test
public void testHealthCheckCmdParams() {
HealthCheckConfiguration hc = new HealthCheckConfiguration.Builder().cmd("echo hello").interval("5s").timeout("3s").retries(4).build();
String dockerfileContent = new DockerFileBuilder().healthCheck(hc).content();
assertThat(dockerfileToMap(dockerfileContent), hasEntry("HEALTHCHECK", "--interval=5s --timeout=3s --retries=4 CMD echo hello"));
}
Aggregations