Skip to content

Commit

Permalink
Improve docker backend detection under linux during testing (#4378)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Jan 23, 2025
1 parent 9fae3b5 commit dc62850
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/integration/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit dc62850

Please sign in to comment.