"""Harness smoke test (AC-1). The only AZ-406 test that runs inside the e2e-runner docker image. It asserts the harness is wired correctly without depending on any of the fixtures owned by AZ-407+ (no frame replay, no SITL contract checks). What it verifies: 1. pytest discovers tests under `/test-suite`. 2. The CSV reporter plugin is loaded. 3. The parametrize matrix produces at least one variant. 4. The `attach_evidence` fixture is reachable. Per-scenario tests (FT-P-01 onward) will land under their own files in this directory. """ from __future__ import annotations import pytest @pytest.mark.smoke @pytest.mark.traces_to("AC-1") def test_harness_boots(run_id: str, tier: str, mock_suite_sat_url: str) -> None: """The harness has access to RUN_ID, TIER, and the mock service URL.""" # Arrange / Act / Assert assert run_id, "RUN_ID fixture must be set" assert tier in ("tier1-docker", "tier2-jetson", "tier2-chamber"), tier assert mock_suite_sat_url.startswith("http"), mock_suite_sat_url @pytest.mark.smoke @pytest.mark.traces_to("AC-8") def test_parametrize_matrix_smoke(fc_adapter: str, vio_strategy: str) -> None: """The conftest parametrize fixtures produce well-formed values.""" assert fc_adapter in ("ardupilot", "inav") assert vio_strategy in ("okvis2", "klt_ransac", "vins_mono") @pytest.mark.smoke @pytest.mark.traces_to("AC-4") def test_evidence_dir_writable(evidence_dir, attach_evidence, tmp_path) -> None: # type: ignore[no-untyped-def] """attach_evidence copies a file into the per-run bundle and returns a relative path.""" # Arrange src = tmp_path / "smoke.txt" src.write_text("smoke evidence") # Act rel = attach_evidence(src) # Assert assert "smoke.txt" in rel assert any(evidence_dir.rglob("smoke.txt"))