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