Files
mtusi2026lab2/evidence/failures.txt
T
2026-10-21 15:24:04 +03:00

69 lines
2.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Отказы зависимостей и expiry на стенде
# date: 2026-10-21T12:19:38Z
# commit: e20a5a4
## 1. Redis остановлен: полный публичный smoke проходит через PostgreSQL
$ docker compose stop redis
Container messenger-lab2-redis-1 Stopping
Container messenger-lab2-redis-1 Stopped
$ make test
python3 tests/smoke.py --base-url "http://api:8080"
PASS: lab2 public API scenario; infrastructure and grading evidence remain separate.
$ docker compose start redis
Container messenger-lab2-secrets-init-1 Starting
Container messenger-lab2-secrets-init-1 Started
Container messenger-lab2-secrets-init-1 Waiting
Container messenger-lab2-secrets-init-1 Exited
Container messenger-lab2-redis-1 Starting
Container messenger-lab2-redis-1 Started
## 2. PostgreSQL остановлен: ограниченный 503 без внутренних деталей
$ docker compose stop postgres
Container messenger-lab2-postgres-1 Stopping
Container messenger-lab2-postgres-1 Stopped
$ python3 scripts/probe.py status GET /health/ready
GET /health/ready (anonymous) -> 503 {"error": {"code": "unavailable", "message": "database unavailable", "request_id": "e9f781a6-0da4-4a29-9ac6-151a07009e89"}}
$ python3 scripts/probe.py status GET /api/v1/chats
GET /api/v1/chats (anonymous) -> 401 {"error": {"code": "unauthorized", "message": "missing or invalid session", "request_id": "f4bc2df3-97e1-49db-a974-d09e111ab95d"}}
$ python3 scripts/probe.py status GET /api/v1/chats Bearer unknown-token
GET /api/v1/chats (Bearer unknown-token) -> 503 {"error": {"code": "unavailable", "message": "database unavailable", "request_id": "325ae150-9377-4b74-9f91-ffc943c346c3"}}
$ docker compose start postgres
Container messenger-lab2-secrets-init-1 Starting
Container messenger-lab2-secrets-init-1 Started
Container messenger-lab2-secrets-init-1 Waiting
Container messenger-lab2-secrets-init-1 Exited
Container messenger-lab2-postgres-1 Starting
Container messenger-lab2-postgres-1 Started
$ python3 scripts/probe.py ready
ready
## 3. Redis после рестарта пуст (без persistence), сессии берутся из PostgreSQL
$ docker compose restart redis
Container messenger-lab2-redis-1 Restarting
Container messenger-lab2-redis-1 Started
$ make test
python3 tests/smoke.py --base-url "http://api:8080"
PASS: lab2 public API scenario; infrastructure and grading evidence remain separate.
## 4. Expiry: API пересоздан с SESSION_TTL_SECONDS=2
$ docker compose exec -T api printenv SESSION_TTL_SECONDS
2
$ python3 scripts/probe.py expiry 2
register -> 201
login -> 201 expires_at: 2026-10-21T12:20:02.340Z
GET /api/v1/users/me (fresh) -> 200
GET /api/v1/users/me (after 3s) -> 401
$ python3 scripts/probe.py ready
ready