-
-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Bug: Tests fail when Docker is unavailable
Description
Running pytest on environments where Docker is not installed or not running currently raises a DockerException during fixture setup, causing the entire test suite to fail.
Docker-backed fixtures defined in conftest.py should first detect whether Docker is available and skip the dependent tests gracefully if it is not.
Expected Behavior
- Docker availability should be checked before initializing Docker containers.
- Tests that depend on Docker should be skipped when Docker is unavailable.
- The test report should show these tests as skipped, not failed.
Actual Behavior
pytestraises aDockerExceptionduringPostgresContainerfixture setup.- This causes session-level errors, which fail the entire test run instead of skipping Docker-dependent tests.
Affected Files
conftest.py(fixtures usingPostgresContainer)conftest.py(Docker-backed test fixtures)
Suggested Fix
- Add a Docker availability check before starting containers.
- Use
pytest.skip()or conditional fixtures to skip tests when Docker is not accessible.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels