lab2: fix cache revocation, DB timeouts, add failure tests
Skeleton contracts / contracts (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
Container mtusi2026lab2-cache-1 Stopping
|
||||
Container mtusi2026lab2-cache-1 Stopped
|
||||
Container mtusi2026lab2-cache-1 Starting
|
||||
Container mtusi2026lab2-cache-1 Started
|
||||
Container mtusi2026lab2-api-1 Restarting
|
||||
Container mtusi2026lab2-api-1 Started
|
||||
PASS: API works with Valkey down (degraded mode)
|
||||
PASS: logout with cache down returned 204
|
||||
PASS: revoked token rejected while cache down
|
||||
PASS: revoked token still 401 after cache restart (regression fixed)
|
||||
@@ -0,0 +1,4 @@
|
||||
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
|
||||
mtusi2026lab2-api-1 mtusi2026lab2-api "sh -c 'alembic upgr…" api 5 minutes ago Up 6 seconds (health: starting) 127.0.0.1:8080->8080/tcp
|
||||
mtusi2026lab2-cache-1 valkey/valkey:8.0.1-alpine "docker-entrypoint.s…" cache 5 minutes ago Up 40 seconds (healthy) 127.0.0.1:6380->6379/tcp
|
||||
mtusi2026lab2-postgres-1 postgres:16.4-alpine "docker-entrypoint.s…" postgres 5 minutes ago Up 10 seconds (healthy) 127.0.0.1:5433->5432/tcp
|
||||
@@ -0,0 +1,5 @@
|
||||
Container mtusi2026lab2-postgres-1 Stopping
|
||||
Container mtusi2026lab2-postgres-1 Stopped
|
||||
PASS: DB down returned 500 in 5.0s (<8s)
|
||||
PASS: /health/ready returned 503 during DB down
|
||||
PASS: session and data preserved after DB recovery
|
||||
@@ -0,0 +1,3 @@
|
||||
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080"
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
@@ -0,0 +1,2 @@
|
||||
python3 tests/smoke.py --base-url "http://localhost:8080"
|
||||
PASS: lab2 public API scenario; infrastructure and grading evidence remain separate.
|
||||
@@ -0,0 +1,5 @@
|
||||
statement_timeout
|
||||
-------------------
|
||||
0
|
||||
(1 row)
|
||||
|
||||
Reference in New Issue
Block a user