Skip to content

Commit

Permalink
#344 Integration test for docker.info()
Browse files Browse the repository at this point in the history
  • Loading branch information
amihaiemil committed Apr 20, 2020
1 parent 9a81ed1 commit 7d7f17a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/java/com/amihaiemil/docker/UnixDockerITCase.java
Expand Up @@ -62,6 +62,24 @@ public void pingsDocker() throws Exception {
MatcherAssert.assertThat(docker.ping(), Matchers.is(Boolean.TRUE));
}

/**
* UnixDocker can return Info about Docker.
* @throws Exception If something goes wrong.
*/
@Test
public void returnsInfo() throws Exception {
final Docker docker = new UnixDocker(
new File("/var/run/docker.sock")
);
final Info info = docker.info();
MatcherAssert.assertThat(info, Matchers.notNullValue());
MatcherAssert.assertThat(info.docker(), Matchers.is(docker));
MatcherAssert.assertThat(
info.getString("OSType"),
Matchers.equalTo("linux")
);
}

/**
* Docker can return its Events unfiltered.
* @throws Exception If something goes wrong.
Expand Down

0 comments on commit 7d7f17a

Please sign in to comment.