Skip to content

Commit

Permalink
Fixed test case
Browse files Browse the repository at this point in the history
  • Loading branch information
irinil committed Mar 20, 2020
1 parent 9135987 commit 5eba97c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions src/test/java/com/amihaiemil/docker/RemoteDockerTestCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public final class RemoteDockerTestCase {
@Test
public void pingTrueIfResponseIsOk() throws Exception {
MatcherAssert.assertThat(
new TcpDocker(
new RemoteDocker(
new AssertRequest(
new Response(HttpStatus.SC_OK, "")
),
Expand All @@ -70,7 +70,7 @@ public void pingTrueIfResponseIsOk() throws Exception {
@Test
public void pingFalseIfResponseIsNotOk() throws Exception {
MatcherAssert.assertThat(
new TcpDocker(
new RemoteDocker(
new AssertRequest(
new Response(HttpStatus.SC_NOT_FOUND, "")
),
Expand All @@ -86,7 +86,7 @@ public void pingFalseIfResponseIsNotOk() throws Exception {
@Test
public void getsContainers() {
MatcherAssert.assertThat(
new TcpDocker(
new RemoteDocker(
Mockito.mock(HttpClient.class),
URI.create("http://localhost")
).containers(),
Expand All @@ -100,7 +100,7 @@ public void getsContainers() {
@Test
public void returnsSwarm() {
MatcherAssert.assertThat(
new TcpDocker(
new RemoteDocker(
Mockito.mock(HttpClient.class),
URI.create("http://localhost")
).swarm(),
Expand All @@ -115,7 +115,7 @@ public void returnsSwarm() {
@Test
public void returnsImages() {
MatcherAssert.assertThat(
new TcpDocker(
new RemoteDocker(
Mockito.mock(HttpClient.class),
URI.create("http://localhost")
).images(),
Expand All @@ -130,7 +130,7 @@ public void returnsImages() {
public void returnsHttpClient() {
final HttpClient client = Mockito.mock(HttpClient.class);
MatcherAssert.assertThat(
new TcpDocker(
new RemoteDocker(
client,
URI.create("http://localhost")
).httpClient(),
Expand All @@ -147,7 +147,7 @@ public void returnsHttpClient() {
@Test
public void returnsAuthHttpClient() {
MatcherAssert.assertThat(
new TcpDocker(
new RemoteDocker(
URI.create("http://localhost"),
new Credentials("user", "pwd", "user@email.com", "server.com")
).httpClient(),
Expand All @@ -164,7 +164,7 @@ public void returnsAuthHttpClient() {
@Test
public void returnsVolumes() {
MatcherAssert.assertThat(
new TcpDocker(
new RemoteDocker(
Mockito.mock(HttpClient.class),
URI.create("http://localhost")
).volumes(),
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/com/amihaiemil/docker/UnixDockerITCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public final class UnixDockerITCase {
*/
@Test
public void pingsDocker() throws Exception {
final Docker docker = new LocalDocker(
final Docker docker = new UnixDocker(
new File("/var/run/docker.sock")
);
MatcherAssert.assertThat(docker.ping(), Matchers.is(Boolean.TRUE));
Expand All @@ -64,7 +64,7 @@ public void pingsDocker() throws Exception {
@Test
@Ignore
public void followsEvents() throws Exception {
final Reader reader = new LocalDocker(
final Reader reader = new UnixDocker(
new File("/var/run/docker.sock")
).events();
final String events = IOUtils.toString(reader);
Expand All @@ -79,7 +79,7 @@ public void followsEvents() throws Exception {
*/
@Test
public void listVolumes() throws Exception {
final Docker docker = new LocalDocker(
final Docker docker = new UnixDocker(
Paths.get("/var/run/docker.sock").toFile()
);
MatcherAssert.assertThat(
Expand Down

0 comments on commit 5eba97c

Please sign in to comment.