Skip to content

Commit c2c9f9a

Browse files
integration: Also catch NotFound exception
Docker v29 uses containerd to pull Otherwise we get this error with Docker v29.2.0: E docker.errors.ImageNotFound: 404 Client Error for http+docker://localhost/v1.45/containers/create: Not Found ("No such image: dockerpytest_does_not_exist:latest") Signed-off-by: Ricardo Branco <rbranco@suse.de>
1 parent 8dd41ce commit c2c9f9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/integration/models_containers_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_run_with_error(self):
3636

3737
def test_run_with_image_that_does_not_exist(self):
3838
client = docker.from_env(version=TEST_API_VERSION)
39-
with pytest.raises(docker.errors.ImageNotFound):
39+
with pytest.raises((docker.errors.ImageNotFound, docker.errors.NotFound)):
4040
client.containers.run("dockerpytest_does_not_exist")
4141

4242
@pytest.mark.skipif(

0 commit comments

Comments
 (0)