forked from mtusi2026/mtusi2026lab3
29 lines
1.1 KiB
Plaintext
29 lines
1.1 KiB
Plaintext
Container mtusi-lab3-redis-1 Stopping
|
|
Container mtusi-lab3-redis-1 Stopped
|
|
Container mtusi-lab3-redis-1 Starting
|
|
Container mtusi-lab3-redis-1 Started
|
|
Container mtusi-lab3-postgres-1 Stopping
|
|
Container mtusi-lab3-postgres-1 Stopped
|
|
Container mtusi-lab3-postgres-1 Starting
|
|
Container mtusi-lab3-postgres-1 Started
|
|
== 1. Redis недоступен ==
|
|
$ docker compose --env-file .env stop redis
|
|
ok - valid token still works without Redis (cache bypassed)
|
|
ok - writes still work without Redis
|
|
ok - login works without Redis
|
|
ok - forged token still rejected without Redis
|
|
$ docker compose --env-file .env start redis
|
|
== 2. PostgreSQL недоступен ==
|
|
$ docker compose --env-file .env stop postgres
|
|
ok - history without DB -> 503, not a hang (got 503)
|
|
ok - unknown token is never trusted without DB (got 503)
|
|
ok - anonymous request -> 401
|
|
ok - /health/ready -> 503
|
|
ok - /health/live -> 200 (process is alive)
|
|
$ docker compose --env-file .env start postgres
|
|
== 3. восстановление ==
|
|
ok - /health/ready back to 200
|
|
ok - same token reads the same history after DB is back
|
|
|
|
11 passed, 0 failed
|