"""Integration tests for tool container home directory behavior. These tests exercise container lifecycle behavior and require Docker and a running PostgreSQL database. They are skipped when Docker is unavailable. """ import subprocess import pytest def _docker_available() -> bool: try: result = subprocess.run( ["docker", "info"], capture_output=True, text=True, timeout=10, ) return result.returncode == 0 except Exception: return False @pytest.mark.integration @pytest.mark.skipif(not _docker_available(), reason="Docker not available") def test_docker_available_placeholder() -> None: """Placeholder to keep the test file valid when Docker is present. Real lifecycle tests (container starts with HOME=/home/user, /workspace symlink works, git mounts are writable) should be added here once the test harness can start the API and Docker services. """ assert _docker_available()