feat(regression): add E2E canary regression suite (tests/regression/)
continuous-integration/drone/push Build is failing
continuous-integration/drone/push Build is failing
Seven canaries prove both halves of the server's job: - GREEN: good apps are reported healthy (good-simple + good-significant) - RED: broken apps are caught at intended tier (false-green guard + 4 per-tier) Fixtures: custom-html-bkp-bad (backup tier RED) + custom-html-rst-bad (restore tier RED). All 7 canaries verified on live server (see STATUS-regression.md for artifacts). Not wired to per-commit CI — run on-demand: pytest -m canary tests/regression/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
baf5a21bdc
commit
73427d6e36
@@ -0,0 +1,19 @@
|
||||
"""custom-html-bkp-bad — lifecycle ops for bad-backup/bad-restore RED canaries.
|
||||
|
||||
Intentionally has NO pre_backup hook: the marker is never seeded before backup,
|
||||
so the backup snapshot has no ci-marker.txt. pre_restore writes "mutated" so that if
|
||||
restore DOES bring back the snapshot, the marker is gone/still-mutated → test fails.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from harness import lifecycle
|
||||
|
||||
MARKER_PATH = "/usr/share/nginx/html/ci-marker.txt"
|
||||
|
||||
|
||||
def pre_restore(domain: str, meta: dict) -> None:
|
||||
"""Write 'mutated' to the marker before restore runs. If restore brings back the
|
||||
snapshot (which has no marker — never seeded by pre_backup), the marker ends up
|
||||
MISSING or 'mutated' after restore → test_restore_returns_state FAILS → restore=RED."""
|
||||
lifecycle.exec_in_app(domain, ["sh", "-c", f"echo mutated > {MARKER_PATH}"])
|
||||
Reference in New Issue
Block a user