Files
awoooi/scripts/reboot-recovery/tests/test_post_start_quick_check_contract.py
Your Name 5e843e81c1
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / build-and-deploy (push) Has been cancelled
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / tests (push) Has been cancelled
fix(recovery): finalize reboot slo live readback
2026-06-29 15:08:47 +08:00

27 lines
970 B
Python

from __future__ import annotations
from pathlib import Path
ROOT = Path(__file__).resolve().parents[3]
SCRIPT = ROOT / "scripts" / "reboot-recovery" / "post-start-quick-check.sh"
def test_post_start_self_checks_can_run_locally_on_110() -> None:
text = SCRIPT.read_text(encoding="utf-8")
assert "is_local_target()" in text
assert 'ips="$(local_ip_list)"' in text
assert 'local_ip_list | grep' not in text
assert 'bash -lc "$command"' in text
assert 'ssh -o BatchMode=yes -o ConnectTimeout="$SSH_CONNECT_TIMEOUT" "$user_host" "$command"' in text
def test_runner_pressure_is_capacity_evidence_after_routes_recover() -> None:
text = SCRIPT.read_text(encoding="utf-8")
assert "service_route_recovered()" in text
assert "capacity_or_runner_issue()" in text
assert "cold-start non-route blockers retained as capacity/freshness evidence" in text
assert 'capacity_or_runner_issue "110 host pressure gate is blocking"' in text