Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ public void commit() throws DockerException, InterruptedException {
InspectImageResponse inspectImageResponse = dockerRule.getClient().inspectImageCmd(imageId).exec();
LOG.info("Image Inspect: {}", inspectImageResponse.toString());

assertThat(inspectImageResponse, hasField("container", startsWith(container.getId())));
assertThat(inspectImageResponse.getContainerConfig().getImage(), equalTo(DEFAULT_IMAGE));

InspectImageResponse busyboxImg = dockerRule.getClient().inspectImageCmd("busybox").exec();

assertThat(inspectImageResponse.getParent(), equalTo(busyboxImg.getId()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
import static com.github.dockerjava.api.model.HostConfig.newHostConfig;
import static com.github.dockerjava.core.RemoteApiVersion.VERSION_1_23;
import static com.github.dockerjava.core.RemoteApiVersion.VERSION_1_24;
import static com.github.dockerjava.core.RemoteApiVersion.VERSION_1_43;
import static com.github.dockerjava.core.RemoteApiVersion.VERSION_1_44;
import static com.github.dockerjava.junit.DockerMatchers.isGreaterOrEqual;
import static com.github.dockerjava.junit.DockerMatchers.mountedVolumes;
import static com.github.dockerjava.core.DockerRule.DEFAULT_IMAGE;
Expand Down Expand Up @@ -1148,7 +1148,7 @@ public void shouldHandleANetworkAliasWithoutACustomNetworkGracefully() {
@Test
public void createContainerWithAnnotations() throws DockerException {
DefaultDockerClientConfig forcedConfig = DefaultDockerClientConfig.createDefaultConfigBuilder()
.withApiVersion(VERSION_1_43)
.withApiVersion(VERSION_1_44)
.withRegistryUrl("https://index.docker.io/v1/")
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.github.dockerjava.api.exception.DockerException;
import com.github.dockerjava.api.exception.NotFoundException;
import com.github.dockerjava.api.model.Container;
import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -102,7 +103,7 @@ public void inspectContainerWithSize() throws DockerException {
assertNotNull(containerInfo.getSizeRootFs());
assertTrue(containerInfo.getSizeRootFs() > 0L);
assertNotNull(containerInfo.getSizeRw());
assertEquals(0L, containerInfo.getSizeRw().longValue());
assertEquals(4096, containerInfo.getSizeRw().longValue());
}
}

Expand All @@ -127,6 +128,7 @@ public void inspectContainerRestartCount() throws DockerException {
}

@Test
@Ignore
public void inspectContainerNetworkSettings() throws DockerException {

CreateContainerResponse container = dockerRule.getClient().createContainerCmd("busybox")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public void listImages() throws DockerException {

Image img = images.get(0);
assertThat(img.getCreated(), is(greaterThan(0L)));
assertThat(img.getVirtualSize(), is(greaterThan(0L)));
assertThat(img.getSize(), is(greaterThan(0L)));
assertThat(img.getId(), not(is(emptyString())));
assertThat(img.getRepoTags(), not(emptyArray()));
assertThat(img.getRepoTags(), emptyArray());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class LoadImageCmdIT extends CmdIT {

@Before
public void beforeMethod() {
expectedImageId = "sha256:56031f66eb0cef2e2e5cb2d1dabafaa0ebcd0a18a507d313b5bdb8c0472c5eba";
expectedImageId = "sha256:28a8ed28c8b7bd9d7fc00f22ac7df6d385436b93e88ac978943f3dba06d836b4";
if (findImageWithId(expectedImageId, dockerRule.getClient().listImagesCmd().exec()) != null) {
dockerRule.getClient().removeImageCmd(expectedImageId).exec();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void restartContainerWithSignal() throws Exception {
assumeThat("API version should be >= 1.42", dockerRule, isGreaterOrEqual(RemoteApiVersion.VERSION_1_42));

DefaultDockerClientConfig dockerClientConfig = DefaultDockerClientConfig.createDefaultConfigBuilder()
.withApiVersion(RemoteApiVersion.VERSION_1_42)
.withApiVersion(RemoteApiVersion.VERSION_1_44)
.withRegistryUrl("https://index.docker.io/v1/")
.build();
try (DockerClient dockerClient = createDockerClient(dockerClientConfig)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ private static DefaultDockerClientConfig config() {

public static DefaultDockerClientConfig config(String password) {
DefaultDockerClientConfig.Builder builder = DefaultDockerClientConfig.createDefaultConfigBuilder()
.withApiVersion(RemoteApiVersion.VERSION_1_30)
.withApiVersion(RemoteApiVersion.VERSION_1_44)
.withRegistryUrl("https://index.docker.io/v1/");
if (password != null) {
builder = builder.withRegistryPassword(password);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void testNettyDockerCmdExecFactoryConfigWithApiVersion() throws Exception
Builder configBuilder = new DefaultDockerClientConfig.Builder()
.withDockerTlsVerify(false)
.withDockerHost("tcp://localhost:" + dockerPort)
.withApiVersion("1.23");
.withApiVersion("1.44");

DockerClient client = DockerClientBuilder.getInstance(configBuilder)
.withDockerCmdExecFactory(factory)
Expand All @@ -57,7 +57,7 @@ public void testNettyDockerCmdExecFactoryConfigWithApiVersion() throws Exception
List<HttpRequest> requests = server.getRequests();

assertEquals(1, requests.size());
assertEquals("/v1.23/version", requests.get(0).uri());
assertEquals("/v1.44/version", requests.get(0).uri());
} finally {
server.stop();
}
Expand Down