From 12fa124292cd662aa7dd8fe813b5859669256327 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Thu, 23 Jan 2025 13:43:36 +0000 Subject: [PATCH] Improve docker backend detection under linux --- tests/integration/test_command.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_command.py b/tests/integration/test_command.py index 849823661..0832f4922 100644 --- a/tests/integration/test_command.py +++ b/tests/integration/test_command.py @@ -87,8 +87,8 @@ def has_pure_docker() -> bool: failure = "Docker is using podman's backend, run `sudo podman-mac-helper uninstall` to disable it." else: failure = "Docker is using podman's backend, so we will skip running docker tests as they are high likely to fail. See https://github.com/ansible-collections/community.docker/issues/660 https://github.com/containers/podman/issues/16548" - elif result.stdout != "Not Found": - failure = "Unexpected response from Docker's default socket." + elif result.stdout.rstrip() not in ("Not Found", '{"message":"page not found"}'): + failure = f"Unexpected response from Docker's default socket {result.stdout}." else: result = run(["docker", "context", "inspect", "--format", "{{.Endpoints.docker.Host}}"]) if result.returncode != 0: