Add operational health, encrypted backups and isolated restore drills
This commit is contained in:
@@ -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.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user