@@ -83,6 +83,7 @@ public void startContainerWithVolumes() throws DockerException {
8383 containerInspectResponse = dockerClient .inspectContainerCmd (container
8484 .getId ()).exec ();
8585
86+
8687 assertThat (Arrays .asList (containerInspectResponse .getVolumes ()),
8788 contains (volume1 , volume2 ));
8889
@@ -100,7 +101,7 @@ public void startContainerWithPortBindings() throws DockerException {
100101
101102 ContainerCreateResponse container = dockerClient
102103 .createContainerCmd ("busybox" )
103- .withCmd ("true " ).withExposedPorts (tcp22 , tcp23 ).exec ();
104+ .withCmd ("top " ).withExposedPorts (tcp22 , tcp23 ).exec ();
104105
105106 LOG .info ("Created container {}" , container .toString ());
106107
@@ -117,6 +118,8 @@ public void startContainerWithPortBindings() throws DockerException {
117118
118119 containerInspectResponse = dockerClient .inspectContainerCmd (container
119120 .getId ()).exec ();
121+
122+ assertThat (containerInspectResponse .getState ().isRunning (), is (true ));
120123
121124 assertThat (Arrays .asList (containerInspectResponse .getConfig ().getExposedPorts ()),
122125 contains (tcp22 , tcp23 ));
@@ -190,7 +193,7 @@ public void startContainerWithLinking() throws DockerException {
190193 public void startContainer () throws DockerException {
191194
192195 ContainerCreateResponse container = dockerClient
193- .createContainerCmd ("busybox" ).withCmd ("true" ).exec ();
196+ .createContainerCmd ("busybox" ).withCmd (new String [] { "top" } ).exec ();
194197
195198 LOG .info ("Created container {}" , container .toString ());
196199 assertThat (container .getId (), not (isEmptyString ()));
0 commit comments