X Tutup
Skip to content

Commit 6761841

Browse files
committed
Add helper for api version extraction
1 parent b5c7f44 commit 6761841

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.github.dockerjava.utils;
2+
3+
import com.github.dockerjava.api.DockerClient;
4+
import com.github.dockerjava.core.RemoteApiVersion;
5+
6+
/**
7+
* @author Kanstantsin Shautsou
8+
*/
9+
public class TestUtils {
10+
private TestUtils() {
11+
}
12+
13+
public static RemoteApiVersion getVersion(DockerClient client) {
14+
final String serverVersion = client.versionCmd().exec().getApiVersion();
15+
return RemoteApiVersion.parseConfig(serverVersion);
16+
}
17+
}

0 commit comments

Comments
 (0)
X Tutup