use of io.fabric8.maven.docker.access.UrlBuilder in project docker-maven-plugin by fabric8io.
the class DockerAccessWithHcClient method getLogSync.
@Override
public void getLogSync(String containerId, LogCallback callback) {
LogRequestor extractor = new LogRequestor(delegate.getHttpClient(), urlBuilder, containerId, callback);
extractor.fetchLogs();
}
use of io.fabric8.maven.docker.access.UrlBuilder in project docker-maven-plugin by fabric8io.
the class UrlBuilderTest method tagContainer.
@Test
public void tagContainer() throws URISyntaxException {
UrlBuilder builder = new UrlBuilder("", "1.0");
assertEquals(new URI("/1.0/images/t1%3Alatest/tag?force=1&repo=new&tag=tag1"), new URI(builder.tagContainer(new ImageName("t1:latest"), new ImageName("new:tag1"), true)));
}
use of io.fabric8.maven.docker.access.UrlBuilder in project docker-maven-plugin by fabric8io.
the class UrlBuilderTest method pullImage.
@Test
public void pullImage() throws URISyntaxException {
UrlBuilder builder = new UrlBuilder("", "1.0");
assertEquals(new URI("/1.0/images/create?fromImage=reg%2Ft1&tag=latest"), new URI(builder.pullImage(new ImageName("t1:latest"), "reg")));
assertEquals(new URI("/1.0/images/create?fromImage=reg%2Ft1&tag=latest"), new URI(builder.pullImage(new ImageName("t1"), "reg")));
}
use of io.fabric8.maven.docker.access.UrlBuilder 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.maven.docker.access.UrlBuilder in project docker-maven-plugin by fabric8io.
the class UrlBuilderTest method containerLogs.
@Test
public void containerLogs() throws URISyntaxException {
UrlBuilder builder = new UrlBuilder("", "1.0");
assertEquals(new URI("/1.0/containers/cid/logs?follow=0&stderr=1&stdout=1×tamps=1"), new URI(builder.containerLogs("cid", false)));
}
Aggregations