replace docker deployment with native system
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
"""Exercise disposable deployment containers through the host's trusted proxy address.
|
||||
"""Exercise a disposable native deployment through the host's trusted proxy address.
|
||||
|
||||
The forwarded HTTPS header simulates Nginx TLS termination; this is never run
|
||||
against an existing hotel database. Cookie values and credentials are not logged.
|
||||
@@ -35,7 +35,7 @@ def request(path, method="GET", data=None, expected=200):
|
||||
return json.loads(body) if "application/json" in response.headers.get("Content-Type", "") else body
|
||||
|
||||
|
||||
assert "root" in request("/"), "Container must serve the built React interface"
|
||||
assert "root" in request("/"), "Native API must serve the built React interface"
|
||||
request("/api/hotel", expected=401)
|
||||
session = request("/api/session")
|
||||
assert session["preview"] is False and session["user"] is None
|
||||
@@ -60,16 +60,16 @@ assert "securityKey" not in payment_status
|
||||
request("/api/payments/controls", "PUT", {"version": 0, "enabled": True}, expected=400)
|
||||
assert request("/api/payments/requests") == []
|
||||
hotel = request("/api/hotel")
|
||||
assert "root" in request("/account"), "Container must serve account link page"
|
||||
assert "root" in request("/account"), "Native API must serve account link page"
|
||||
assert len(request("/api/onboarding")["steps"]) == 5
|
||||
team = request("/api/team")
|
||||
assert all("passwordHash" not in member and "securityStamp" not in member and "accountLinkHash" not in member for member in team)
|
||||
if "--read" in sys.argv:
|
||||
assert hotel["signature"] == "Persisted across container restart"
|
||||
assert hotel["signature"] == "Persisted across service restart"
|
||||
invited = next(member for member in team if member["email"] == "deployment-staff@example.invalid")
|
||||
assert invited["pending"] and not invited["active"] and invited["linkPurpose"] == "Invite"
|
||||
else:
|
||||
hotel["signature"] = "Persisted across container restart"
|
||||
hotel["signature"] = "Persisted across service restart"
|
||||
request("/api/hotel", "PUT", hotel)
|
||||
invite = request("/api/team/invite", "POST", {"name": "Deployment Staff", "email": "deployment-staff@example.invalid"})
|
||||
assert invite["link"].startswith("https://guestops-sandbox.futuresens.co.uk/account#token=")
|
||||
|
||||
Reference in New Issue
Block a user