approval-engine/tests/test_cadence.py

23 lines
792 B
Python
Raw Normal View History

from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
def test_layer_yaml_cadence_declared():
text = (ROOT / "layer.yaml").read_text()
assert "cadence_status: declared" in text
assert "cadence_form: heartbeat-or-reconciliation" in text
assert "cadence: cadence.yaml" in text
assert "cadence_status: undeclared" not in text
def test_cadence_yaml_forbids_rate_monitoring():
text = (ROOT / "cadence.yaml").read_text()
assert "kind: load-bearing" in text
assert "form: heartbeat-or-reconciliation" in text
assert "rate_monitoring: forbidden" in text
assert "missing: finding" in text
assert "divergence: finding" in text
for cls in ("issuance", "use", "supersession", "revocation", "heartbeat"):
assert f"{cls}:" in text