Files
wise-validator/tests/test_schema.py
tegwick 8d509fc6f1 Implement SAND-WP-0003: validation meta-framework extraction
Port e2e-framework schema, runner, and reporter into wise-validator with
sand-boxer CLI integration, validate run CLI, unit tests, registry capability,
and operator docs.
2026-06-23 21:37:07 +02:00

25 lines
727 B
Python

"""E2EConfig schema tests."""
from pathlib import Path
import pytest
from wisevalidator.schema import E2EConfig, HealthCheck
FIXTURE_REPO = Path(__file__).parent / "fixtures" / "minimal_repo"
def test_load_minimal_fixture() -> None:
config = E2EConfig.load(FIXTURE_REPO)
assert config.name == "fixture-repo"
assert config.compose_file == "docker-compose.yml"
assert config.test_command == "echo ok"
assert len(config.health_checks) == 1
assert config.health_checks[0] == HealthCheck(
name="web", url="http://localhost:8080", timeout=30
)
def test_missing_e2e_yml(tmp_path: Path) -> None:
with pytest.raises(FileNotFoundError, match="No e2e.yml"):
E2EConfig.load(tmp_path)