ЛР 2: PostgreSQL, сессии, Redis и исследование

This commit is contained in:
Никита
2026-10-06 13:34:34 +03:00
parent 65003b6119
commit 6a8908ab99
111 changed files with 6686 additions and 38 deletions
+32
View File
@@ -0,0 +1,32 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
mkdir -p evidence
exec 3>&1
exec > evidence/grade4-checks.txt 2>&1
date -u '+Verified: %Y-%m-%d %H:%M:%S UTC'
for target in build check validate test student-test test-ui test-grade4 explain-history test-dependencies test-expiry; do
printf '\n$ make %s\n' "$target"
printf 'Running: make %s\n' "$target" >&3
if ! make "$target"; then
tail -n 25 evidence/grade4-checks.txt >&3
exit 1
fi
done
printf '\nContainer start times before persistence hook:\n'
for service in postgres redis api; do
docker inspect "$(docker compose ps -q "$service")" --format "$service {{.State.StartedAt}}"
done
printf '\n$ make test-persistence\n'
make test-persistence
printf '\nContainer start times after persistence hook:\n'
for service in postgres redis api; do
docker inspect "$(docker compose ps -q "$service")" --format "$service {{.State.StartedAt}}"
done
printf '\nPostgreSQL migrations and password KDF (no hashes/credentials):\n'
docker compose exec -T postgres psql -X -U messenger -d messenger -Atc "SELECT 'migrations=' || count(*) FROM schema_migrations; SELECT DISTINCT left(password_hash, 9) FROM users;"
printf '\n$ git check-ignore .env secrets/postgres_password secrets/database_url\n'
git check-ignore .env secrets/postgres_password secrets/database_url
printf '\nPASS: all required local grade 4 checks completed\n'