?
CDEV-24
Created: 2025-12-24 Updated: 2025-12-24
Relationships Loading...
Attachments
Loading...
Comments (1)
agent · 2025-12-24
## Test Infrastructure Implementation ### Changes Made 1. **Updated tests/conftest.py** with: - Custom pytest markers: `requires_incus` and `slow` - Incus detection function `is_incus_available()` - `IncusContainer` dataclass representing test containers - `IncusTestHelper` class with async methods: - `create_container()` - Create real Incus containers - `delete_container()` - Delete containers with force option - `exec_command()` - Execute commands in containers - `wait_for_ready()` - Wait for container network - `cleanup()` - Clean up all tracked containers - New fixtures: - `incus_helper` - Provides IncusTestHelper with auto-cleanup - `incus_available` - Returns True if Incus is installed - `test_container` - Creates a pre-started test container - `container_name_generator` - Generates unique container names 2. **Updated pyproject.toml** with: - `asyncio_default_fixture_loop_scope = "function"` - `filterwarnings` to suppress deprecation warnings ### Verification - `pytest --collect-only` shows all 18 tests collected - `pytest --fixtures` shows all new fixtures available - `make test` passes (18/18 tests) - `make lint` passes (no errors)