generated from coulomb/repo-seed
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.
25 lines
727 B
Python
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) |