|
18 | 18 |
|
19 | 19 | import cd.go.contrib.elasticagents.dockerswarm.elasticagent.requests.CreateAgentRequest; |
20 | 20 | import com.google.common.collect.ImmutableList; |
21 | | -import com.spotify.docker.client.DockerClient; |
22 | | -import com.spotify.docker.client.messages.Container; |
23 | 21 | import com.spotify.docker.client.messages.Volume; |
24 | 22 | import com.spotify.docker.client.messages.mount.Mount; |
25 | 23 | import com.spotify.docker.client.messages.swarm.*; |
|
33 | 31 |
|
34 | 32 | import static java.lang.String.format; |
35 | 33 | import static org.hamcrest.Matchers.*; |
36 | | -import static org.junit.Assert.*; |
| 34 | +import static org.junit.Assert.assertEquals; |
| 35 | +import static org.junit.Assert.assertThat; |
37 | 36 |
|
38 | 37 | public class DockerServiceTest extends BaseTest { |
39 | 38 |
|
@@ -109,13 +108,8 @@ public void shouldStartContainerWithCorrectCommand() throws Exception { |
109 | 108 | DockerService service = DockerService.create(new CreateAgentRequest("key", properties, "prod"), createSettings(), docker); |
110 | 109 | services.add(service.name()); |
111 | 110 | Service serviceInfo = docker.inspectService(service.name()); |
112 | | - assertThat(serviceInfo.spec().taskTemplate().containerSpec().command(), is(command)); |
113 | | - |
114 | | - List<Container> containers = waitForContainerToStart(service, 15); |
115 | 111 |
|
116 | | - String logs = docker.logs(containers.get(0).id(), DockerClient.LogsParam.stdout()).readFully(); |
117 | | - assertThat(logs, containsString("127.0.0.1")); // from /etc/hosts |
118 | | - assertThat(logs, containsString("floppy:x:11:root")); // from /etc/group |
| 112 | + assertThat(serviceInfo.spec().taskTemplate().containerSpec().command(), is(command)); |
119 | 113 | } |
120 | 114 |
|
121 | 115 | @Test |
|
0 commit comments