Search in sources :

Example 1 with HealthCheckConfiguration

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"));
}
Also used : HealthCheckConfiguration(io.fabric8.maven.docker.config.HealthCheckConfiguration) Test(org.junit.Test)

Example 2 with HealthCheckConfiguration

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"));
}
Also used : HealthCheckConfiguration(io.fabric8.maven.docker.config.HealthCheckConfiguration) Test(org.junit.Test)

Aggregations

HealthCheckConfiguration (io.fabric8.maven.docker.config.HealthCheckConfiguration)2 Test (org.junit.Test)2