X Tutup
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 @@ -97,7 +97,7 @@ protected Void impl() throws DockerException {

try {
LOGGER.trace("POST: {}", webResource);
Builder builder = webResource.accept(MediaType.TEXT_PLAIN);
Builder builder = webResource.accept(MediaType.APPLICATION_JSON);
if (startContainerConfig != null) {
builder.type(MediaType.APPLICATION_JSON).post(startContainerConfig);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public void startContainerWithVolumes() throws DockerException {
containerInspectResponse = dockerClient.inspectContainerCmd(container
.getId()).exec();


assertThat(Arrays.asList(containerInspectResponse.getVolumes()),
contains(volume1, volume2));

Expand Down Expand Up @@ -117,7 +118,7 @@ public void startContainerWithPortBindings() throws DockerException {

containerInspectResponse = dockerClient.inspectContainerCmd(container
.getId()).exec();

assertThat(Arrays.asList(containerInspectResponse.getConfig().getExposedPorts()),
contains(tcp22, tcp23));

Expand Down Expand Up @@ -190,7 +191,7 @@ public void startContainerWithLinking() throws DockerException {
public void startContainer() throws DockerException {

ContainerCreateResponse container = dockerClient
.createContainerCmd("busybox").withCmd("true").exec();
.createContainerCmd("busybox").withCmd(new String[] { "top" }).exec();

LOG.info("Created container {}", container.toString());
assertThat(container.getId(), not(isEmptyString()));
Expand Down
X Tutup