24 lines
824 B
Python
24 lines
824 B
Python
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
MAIN = ROOT / "ansible/roles/cezen-backend/files/main.py"
|
|
|
|
|
|
def test_readiness_contract_has_state_freshness_impact_and_actions():
|
|
source = MAIN.read_text()
|
|
assert '"cezen.readiness_report.v2"' in source
|
|
for field in ("observed_at", "freshness_seconds", "affected_capabilities", "next_actions"):
|
|
assert field in source
|
|
|
|
|
|
def test_readiness_contract_preserves_entitlement_reasons():
|
|
source = MAIN.read_text()
|
|
for reason in ("not_licensed", "not_provisioned", "unsupported_hardware", "degraded", "unavailable"):
|
|
assert reason in source
|
|
|
|
|
|
def test_readiness_display_target_is_ten_seconds():
|
|
spec = " ".join((ROOT / "specs/001-enterprise-experience/spec.md").read_text().split())
|
|
assert "within 10 seconds" in spec
|