use of io.fabric8.annotations.Path in project docker-maven-plugin by fabric8io.
the class UrlBuilderTest method copyArchive.
@Test
public void copyArchive() throws URISyntaxException {
UrlBuilder builder = new UrlBuilder("", "1.0");
assertEquals(new URI("/1.0/containers/cid/archive?path=tp"), new URI(builder.copyArchive("cid", "tp")));
}
use of io.fabric8.annotations.Path in project docker-maven-plugin by fabric8io.
the class ComposeUtilsTest method resolveComposeFileWithRelativeComposeFileAndAbsoluteBaseDir.
@Test
public void resolveComposeFileWithRelativeComposeFileAndAbsoluteBaseDir() throws Exception {
// relative/path/to/docker-compose.yaml
String relComposeFile = join(SEP, "relative", "path", "to", "docker-compose.yaml");
final String absMavenProjectDir = createTmpFile(className).getAbsolutePath();
new Expectations() {
{
project.getBasedir();
result = new File(absMavenProjectDir);
}
};
assertEquals(new File(ABS_BASEDIR, relComposeFile), ComposeUtils.resolveComposeFileAbsolutely(ABS_BASEDIR, relComposeFile, project));
new VerificationsInOrder() {
{
project.getBasedir();
}
};
}
use of io.fabric8.annotations.Path in project docker-maven-plugin by fabric8io.
the class ComposeUtilsTest method resolveComposesFileWithRelativeComposeFileParentDirectory.
@Test
public void resolveComposesFileWithRelativeComposeFileParentDirectory() throws Exception {
// ../relative/path/to/docker-compose.yaml
String relComposeFile = join(SEP, DOT + DOT, "relative", "path", "to", "docker-compose.yaml");
File tmpDir = createTmpFile(ComposeUtilsTest.class.getName());
String absBaseDir = tmpDir.getAbsolutePath();
assertEquals(new File(tmpDir.getParentFile(), relComposeFile.substring(3)), ComposeUtils.resolveComposeFileAbsolutely(absBaseDir, relComposeFile, null));
}
use of io.fabric8.annotations.Path in project docker-maven-plugin by fabric8io.
the class ComposeUtilsTest method resolveComposeFileWithRelativeComposeFileAndRelativeBaseDir.
@Test
public void resolveComposeFileWithRelativeComposeFileAndRelativeBaseDir() throws Exception {
// relative/path/to/docker-compose.yaml
String relComposeFile = join(SEP, "relative", "path", "to", "docker-compose.yaml");
String relBaseDir = "basedir" + SEP;
final String absMavenProjectDir = createTmpFile(className).getAbsolutePath();
new Expectations() {
{
project.getBasedir();
result = new File(absMavenProjectDir);
}
};
assertEquals(new File(new File(absMavenProjectDir, relBaseDir), relComposeFile), ComposeUtils.resolveComposeFileAbsolutely(relBaseDir, relComposeFile, project));
new VerificationsInOrder() {
{
project.getBasedir();
}
};
}
use of io.fabric8.annotations.Path in project vertx-openshift-it by cescoffier.
the class HealthCheckIT method testLivenessIsPresent.
@Test
public void testLivenessIsPresent() throws Exception {
final List<Container> containers = getContainers();
ensureThat("the liveness probe is configured correctly", () -> {
containers.forEach(c -> {
final Probe livenessProbe = c.getLivenessProbe();
assertThat(livenessProbe).as("Liveness probe should not be null.").isNotNull();
softly.assertThat(livenessProbe.getHttpGet().getPort().getIntVal()).as("port should be defined for liveness probe").isEqualTo(8088);
softly.assertThat(livenessProbe.getHttpGet().getPath()).as("path should be defined for liveness probe").isEqualTo("/isAlive");
});
});
}
Aggregations