forked from docker-java/docker-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVersionCmdIT.java
More file actions
29 lines (20 loc) · 860 Bytes
/
Copy pathVersionCmdIT.java
File metadata and controls
29 lines (20 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.github.dockerjava.cmd;
import com.github.dockerjava.api.exception.DockerException;
import com.github.dockerjava.api.model.Version;
import org.apache.commons.lang3.StringUtils;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class VersionCmdIT extends CmdIT {
public static final Logger LOG = LoggerFactory.getLogger(VersionCmdIT.class);
@Test
public void version() throws DockerException {
Version version = dockerRule.getClient().versionCmd().exec();
LOG.info(version.toString());
assertTrue(version.getGoVersion().length() > 0);
assertTrue(version.getVersion().length() > 0);
assertEquals(StringUtils.split(version.getVersion(), ".").length, 3);
}
}