ЛР 2: PostgreSQL, сессии Basic/Bearer, Redis-кэш, тесты и отчёт

This commit is contained in:
Anatoly Sanzharovskiy
2026-10-15 18:30:21 +03:00
parent 65003b6119
commit dbdb66456a
35 changed files with 2115 additions and 40 deletions
+15
View File
@@ -0,0 +1,15 @@
# 2026-10-15T10:02Z
# hook: локальный аналог scripts/restart.sh (Docker недоступен на стенде): остановка API, pg_ctl restart PostgreSQL, перезапуск Redis, старт API; каталоги данных сохраняются
$ python tests/resilience.py --mode persistence --action-script <hook>
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
# процессы до/после (PID меняются => реально перезапущены):
before:
14201 python3 -m app
14621 redis-server *:6379
14632 /usr/lib/postgresql/16/bin/postgres -D /tmp/pgdata -p 5432 -k /tmp
after:
14958 /usr/lib/postgresql/16/bin/postgres -p 5432 -k /tmp
14968 redis-server *:6379
14975 python3 -m app