test: Skip Docker dependent test cases if we cannot reach the service

This commit is contained in:
Gabriel Ferreira
2025-08-25 10:32:54 +02:00
parent 29a4f3636e
commit 661da5ab57

View File

@@ -214,6 +214,12 @@ class DockerContainerManager:
os.environ[key] = value
del setting, key, value
# Check if we can use Docker (docker-on-docker is a pain)
try:
docker.ps()
except DockerException as e:
currentTestCase.skipTest(f"python-on-whales returned:{e.__str__()}")
# Create Docker client instance and start it
## The Python-on-whales container instance
self.container = docker.run(