forked from mtusi2026/mtusi2026lab2
ЛР2: PostgreSQL, сессии, Redis-кэш, трек 5.2
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
# Полный прогон доказательств на Compose-стенде; вывод — в evidence/ (без токенов и паролей).
|
||||
# Предусловие: make up (стенд запущен). Тест отказов и restart-hook перезапускают контейнеры.
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
dc() { docker compose --env-file .env "$@"; }
|
||||
mkdir -p evidence
|
||||
stamp() { echo "# $(date -u +%FT%TZ) commit=$(git rev-parse --short HEAD 2>/dev/null || echo n/a) host=$(uname -srm)"; }
|
||||
run() { name=$1; shift; { stamp; echo "\$ $*"; "$@" 2>&1; echo "exit=$?"; } > "evidence/$name.txt" || true; tail -3 "evidence/$name.txt"; }
|
||||
|
||||
dc --profile ttl up -d --build --wait
|
||||
{ stamp; docker version --format 'docker {{.Server.Version}}'; dc version; dc --profile ttl images; dc --profile ttl ps; } > evidence/stack.txt 2>&1
|
||||
run make-check make check
|
||||
run smoke make test
|
||||
run test-api python3 student-tests/test_api.py
|
||||
run test-expiry python3 student-tests/test_expiry.py
|
||||
run test-cache-race make test-cache-race
|
||||
: > evidence/restart-hook.txt
|
||||
run persistence make test-persistence ACTION_SCRIPT=scripts/restart.sh
|
||||
run test-failures python3 student-tests/test_failures.py
|
||||
run migrations-rerun dc exec -T api python -m messenger migrate
|
||||
run load python3 tests/load.py --duration 30 --concurrency 4 --output evidence/load.json
|
||||
dc logs --no-color api 2>/dev/null | grep -c 'registration race resolved' > evidence/race-unique-violations.txt || true
|
||||
dc --profile research up -d --wait postgres-restore
|
||||
run track2 python3 research/track2.py
|
||||
echo "evidence collected in evidence/"
|
||||
Reference in New Issue
Block a user