File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/test/java/com/github/dockerjava/netty/exec Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -120,12 +120,19 @@ public void inspectExecNetworkSettings() throws IOException {
120120 assertThat (exec .getId (), not (isEmptyString ()));
121121
122122 InspectExecResponse inspectExecResponse = dockerClient .inspectExecCmd (exec .getId ()).exec ();
123- assertThat (inspectExecResponse .getExitCode (), is (nullValue ()));
123+
124+ if (apiVersion .isGreaterOrEqual (RemoteApiVersion .VERSION_1_22 )) {
125+ assertThat (inspectExecResponse .getExitCode (), is (nullValue ()));
126+ assertThat (inspectExecResponse .getCanRemove (), is (false ));
127+ assertThat (inspectExecResponse .getContainerID (), is (container .getId ()));
128+ } else {
129+ assertThat (inspectExecResponse .getExitCode (), is (0 ));
130+ assertNotNull (inspectExecResponse .getContainer ().getNetworkSettings ().getNetworks ().get ("bridge" ));
131+ }
132+
124133 assertThat (inspectExecResponse .isOpenStdin (), is (false ));
125134 assertThat (inspectExecResponse .isOpenStdout (), is (true ));
126135 assertThat (inspectExecResponse .isRunning (), is (false ));
127- assertThat (inspectExecResponse .getCanRemove (), is (false ));
128- assertThat (inspectExecResponse .getContainerID (), is (container .getId ()));
129136
130137 final InspectExecResponse .Container inspectContainer = inspectExecResponse .getContainer ();
131138 if (apiVersion .isGreaterOrEqual (VERSION_1_22 )) {
You can’t perform that action at this time.
0 commit comments