Files
mtusi2026lab2/evidence/test-persistence-postgres.txt
T

25 lines
1.2 KiB
Plaintext

# Same persistence test with SESSION_STORE=postgres (sessions in table sessions)
$ SESSION_STORE=postgres docker compose up -d --wait api
Container mtusi-lab2-clean-api-1 Healthy
Container mtusi-lab2-clean-api-1 Recreated
Container mtusi-lab2-clean-postgres-1 Healthy
Container mtusi-lab2-clean-valkey-1 Healthy
api env SESSION_STORE=postgres
containers BEFORE:
api StartedAt=2026-10-12T17:10:11.785377847Z
postgres StartedAt=2026-10-12T17:09:31.655693328Z
valkey StartedAt=2026-10-12T17:09:31.612351204Z
$ python tests/resilience.py --mode persistence --action-script scripts/restart.cmd
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
containers AFTER:
api StartedAt=2026-10-12T17:10:30.772464788Z
postgres StartedAt=2026-10-12T17:10:23.581636896Z
valkey StartedAt=2026-10-12T17:10:23.504892649Z
sessions rows in PostgreSQL: 3
$ docker compose up -d --wait api # back to the default SESSION_STORE=valkey
Container mtusi-lab2-clean-api-1 Healthy
Container mtusi-lab2-clean-postgres-1 Healthy
Container mtusi-lab2-clean-valkey-1 Healthy
api env SESSION_STORE=valkey