Files
mtusi2026lab2/scripts/run-checks.sh
T
gamayunov2004 18b419cda2
Student application / application (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
ЛР 2: PostgreSQL, сессии и Valkey — на 4
2026-10-23 18:17:09 +03:00

20 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
mkdir -p evidence
# Run from host: docker compose --profile test run --rm tools sh scripts/run-checks.sh
# Container has the workspace and Docker socket; it is a trusted operator tool only.
make check validate > evidence/checks.txt 2>&1
make test BASE_URL=http://api:8080 > evidence/smoke.txt 2>&1
python student-tests/grade4.py core > evidence/student.txt 2>&1
python student-tests/grade4.py expiry --base-url http://api-expiry:8080 > evidence/expiry.txt 2>&1
python student-tests/grade4.py migrations > evidence/migrations.txt 2>&1
python student-tests/grade4.py explain > evidence/explain.txt 2>&1
python student-tests/grade4.py failures > evidence/failures.txt 2>&1
docker compose ps -q api postgres valkey | xargs docker inspect --format '{{.Name}} {{.State.StartedAt}} {{.Image}}' > evidence/persistence.txt
chmod +x scripts/restart.sh
make test-persistence BASE_URL=http://api:8080 ACTION_SCRIPT=scripts/restart.sh >> evidence/persistence.txt 2>&1
docker compose ps -q api postgres valkey | xargs docker inspect --format '{{.Name}} {{.State.StartedAt}} {{.Image}}' >> evidence/persistence.txt
python student-tests/grade4.py persistence_meta > evidence/session-persistence.txt 2>&1
printf '%s\n' 'PASS: all grade 3/4 checks completed; inspect evidence/*.txt'