Add operational health, encrypted backups and isolated restore drills

This commit is contained in:
wolf-demon
2026-09-21 09:10:54 +01:00
parent bc7cbc1492
commit 39751c5f1a
18 changed files with 542 additions and 7 deletions
+9
View File
@@ -6,6 +6,7 @@ against an existing hotel database. Cookie values and credentials are not logged
import json
import os
import sys
import time
from http.cookies import SimpleCookie
from urllib.request import Request, urlopen
from urllib.error import HTTPError
@@ -43,6 +44,13 @@ request("/api/auth/login", "POST", {"email": os.environ["BOOTSTRAP_EMAIL"], "pas
session = request("/api/session")
assert session["user"]["role"] == "Owner"
csrf = session["csrfToken"]
assert request("/health/ready") == {"status": "ready"}
for attempt in range(10):
health = request("/api/operations")
if health["worker"]["state"] == "Reporting":
break
time.sleep(1)
assert health["worker"]["state"] == "Reporting" and health["database"] == "Reachable"
auto_status = request("/api/auto-replies/status")
assert auto_status["liveConfigured"] is False
request("/api/auto-replies/mode", "PUT", {"mode": "Live", "version": 0, "acceptanceConfirmed": True}, expected=400)
@@ -68,3 +76,4 @@ else:
request("/api/auth/logout", "POST")
request("/api/hotel", expected=401)
print("Production smoke checks passed: built UI, secure cookies, owner login, persisted settings and staff invitation, onboarding and logout.")