Some checks failed
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Failing after 1m27s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped
27 lines
923 B
Python
27 lines
923 B
Python
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[3]
|
|
SCRIPT = ROOT / "scripts" / "reboot-recovery" / "post-reboot-readiness-summary.sh"
|
|
|
|
|
|
def test_unknown_backup_escrow_evidence_stays_blocked() -> None:
|
|
text = SCRIPT.read_text(encoding="utf-8")
|
|
|
|
assert "POST_REBOOT_SKIP_RUNNER_GUARD" in text
|
|
assert 'post_start_args+=(--skip-runner-guard)' in text
|
|
assert "escrow_evidence_unknown=0" in text
|
|
assert 'elif [[ -z "$escrow_missing_count" ]]; then' in text
|
|
assert "escrow_evidence_unknown=1" in text
|
|
assert "DR_ESCROW_EVIDENCE_UNKNOWN=$escrow_evidence_unknown" in text
|
|
assert (
|
|
'[[ "$backup_core_green" != "1" ]] '
|
|
'&& next_required_gates+=("backup_core_readback_recovery")'
|
|
) in text
|
|
assert (
|
|
'[[ "$dr_escrow_blocked" == "1" ]] '
|
|
'&& next_required_gates+=("credential_escrow_evidence")'
|
|
) in text
|