Skip to content

Commit

Permalink
tests/exec: expect 127 exit code for missing executable
Browse files Browse the repository at this point in the history
Docker Engine has always returned `126` when starting an exec fails due
to a missing binary, but this was due to a bug in the daemon causing the
correct exit code to be overwritten in some cases – see: moby/moby#45795

Change tests to expect correct exit code (`127`).

Signed-off-by: Laura Brehm <[email protected]>
  • Loading branch information
laurazard committed Sep 27, 2024
1 parent a365202 commit ec865ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/integration/models_containers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def test_exec_run_failed(self):
)
self.tmp_containers.append(container.id)
exec_output = container.exec_run("docker ps")
assert exec_output[0] == 126
assert exec_output[0] == 127

def test_kill(self):
client = docker.from_env(version=TEST_API_VERSION)
Expand Down

0 comments on commit ec865ea

Please sign in to comment.