use of io.fabric8.maven.docker.access.UrlBuilder in project docker-maven-plugin by fabric8io.
the class DockerAccessWithHcClient method getLogAsync.
@Override
public LogGetHandle getLogAsync(String containerId, LogCallback callback) {
LogRequestor extractor = new LogRequestor(delegate.createBasicClient(), urlBuilder, containerId, callback);
extractor.start();
return extractor;
}
use of io.fabric8.maven.docker.access.UrlBuilder in project docker-maven-plugin by fabric8io.
the class UrlBuilderTest method listContainers.
@Test
public void listContainers() throws MalformedURLException, UnsupportedEncodingException, URISyntaxException {
UrlBuilder builder = new UrlBuilder("", "1.0");
assertEquals(new URI("/1.0/containers/json"), new URI(builder.listContainers()));
assertEquals(new URI("/1.0/containers/json?filters=" + URLEncoder.encode("{\"ancestor\":[\"nginx\"]}", "UTF8")), new URI(builder.listContainers("ancestor", "nginx")));
try {
builder.listContainers("ancestor");
fail();
} catch (IllegalArgumentException exp) {
assertTrue(exp.getMessage().contains("pair"));
}
}
use of io.fabric8.maven.docker.access.UrlBuilder in project docker-maven-plugin by fabric8io.
the class UrlBuilderTest method deleteImage.
@Test
public void deleteImage() throws URISyntaxException {
UrlBuilder builder = new UrlBuilder("", "1.0");
assertEquals(new URI("/1.0/images/n1?force=0"), new URI(builder.deleteImage("n1", false)));
}
use of io.fabric8.maven.docker.access.UrlBuilder in project docker-maven-plugin by fabric8io.
the class UrlBuilderTest method loadImage.
@Test
public void loadImage() throws URISyntaxException {
UrlBuilder builder = new UrlBuilder("", "1.0");
assertEquals(new URI("/1.0/images/load"), new URI(builder.loadImage()));
}
use of io.fabric8.maven.docker.access.UrlBuilder in project docker-maven-plugin by fabric8io.
the class UrlBuilderTest method getImage.
@Test
public void getImage() throws URISyntaxException {
UrlBuilder builder = new UrlBuilder("", "1.0");
assertEquals(new URI("/1.0/images/n1%3Alatest/get"), new URI(builder.getImage(new ImageName("n1:latest"))));
}
Aggregations