Files
mtusi2026lab2/evidence/cache-failures.txt
T
Daria0w0 c0ca56f208
Application checks / application (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
Complete lab2 grade 4 implementation and report
2026-10-10 00:28:43 +03:00

30 lines
1.9 KiB
Plaintext

Дата: 2026-10-09.
Версия: рабочее дерево после 83e3810 (добавление Redis).
> docker compose up -d --build --wait api
Сборка успешна (go vet, go test, go build); API, PostgreSQL и Redis Healthy.
> py student-tests/cache-failures.py
PASS: public profile cached; TTL <=60s; Redis hit confirmed; TTL not extended
PASS: malformed cache entry replaced from PostgreSQL
PASS: expired profile refilled from PostgreSQL
PASS: Redis stopped -> PostgreSQL fallback 200 (0.438s); anonymous request 401
PASS: Redis restart -> profile refilled; same Bearer token remains valid
PASS: PostgreSQL stopped with warm cache -> 503 (3.172s); anonymous request 401
PASS: PostgreSQL recovered; logout invalidates token even with cached profile
Код завершения: 0. Зависимости восстановлены в finally.
Для проверки истечения тест сокращает TTL только собственного ключа через PEXPIRE;
реальный TTL 60 секунд отдельно проверяется по PTTL, чтение его не продлевает.
Тест не выводит пароли/токены. Измерения — одиночные запросы, не нагрузочный benchmark.
> py tests/smoke.py --base-url http://localhost:8080
PASS: lab2 public API scenario; infrastructure and grading evidence remain separate.
> py tests/resilience.py --mode persistence --action-script scripts/restart.cmd --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.
Область рестарта: api, postgres, redis; снимки в restart-all-containers.json.
StartedAt всех трёх изменился; именованный volume PostgreSQL сохранился.