Аудит F10, F14, F15, F16: rolling update, тесты lab4, CI приложения, тест памяти
- F10: rolling-update.sh собирает migrate (единственный сервис с build), проверяет APP_VERSION в образе, в новой реплике и в ответах через LB; реально выполнено обновление 1 -> 2 (evidence/rolling-update.txt) - F14: s3_outage.py переписан под lab5 (503 в API, retry в worker, принятое задание доходит до ready); устаревший consistency_faults.py удалён - F15: .github/workflows/app.yml — сборка, готовность, smoke и регрессии на изолированном стенде, логи при ошибке, очистка - F16: upload_memory.py с явными критериями и ненулевым кодом выхода, размер в каждой записи, progressive JPEG в смеси - run_all.sh: все регрессии аудита, make validate, регрессия lab3, rolling update
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# Полный прогон проверок lab5 на запущенном стенде с записью результатов в evidence/.
|
||||
# Каждый сценарий сам включает и выключает свои учебные инъекции отказов.
|
||||
# ./student-tests/run_all.sh
|
||||
# Для make validate и сверки со схемой нужен venv (создаётся автоматически в .venv/).
|
||||
set -u
|
||||
cd "$(dirname "$0")/.."
|
||||
E=evidence
|
||||
@@ -17,7 +18,13 @@ run() { # run <name> <command...>
|
||||
states() { docker compose ps --format '{{.Name}} {{.State}}' | sort; \
|
||||
for c in $(docker compose ps -q); do docker inspect -f '{{.Name}} StartedAt={{.State.StartedAt}}' "$c"; done | sort; }
|
||||
|
||||
if [ ! -x .venv/bin/python ]; then
|
||||
python3 -m venv .venv && .venv/bin/python -m pip install -q -r requirements-dev.txt rfc3339-validator
|
||||
fi
|
||||
VPY=.venv/bin/python
|
||||
|
||||
run check make check
|
||||
run validate make validate PYTHON=$VPY
|
||||
run smoke make test
|
||||
{ echo "# containers before persistence hook"; states; } > "$E/containers-before-restart.txt"
|
||||
run persistence make test-persistence ACTION_SCRIPT=scripts/restart.sh
|
||||
@@ -38,8 +45,25 @@ run s3-private-check docker compose --profile tools run --rm -T checks /app/stud
|
||||
run attachments-negative python3 student-tests/attachments_negative.py --output "$E/attachments-negative.json"
|
||||
run attachment-failover python3 student-tests/attachment_failover.py --output "$E/attachment-failover.json"
|
||||
./scripts/start-all.sh >/dev/null 2>&1
|
||||
# --- регрессии внешнего аудита (F01–F17) ---
|
||||
run api-negative-lab5 python3 student-tests/api_negative_lab5.py --output "$E/api-negative-lab5.json"
|
||||
run slow-client python3 student-tests/slow_client.py --output "$E/slow-client.json"
|
||||
run janitor-replay-race python3 student-tests/janitor_replay_race.py --output "$E/janitor-replay-race.json"
|
||||
run queue-contract-check $VPY student-tests/queue_contract_check.py --output "$E/queue-contract-check.json"
|
||||
run s3-outage python3 student-tests/s3_outage.py --output "$E/s3-outage.json"
|
||||
run upload-memory python3 student-tests/upload_memory.py --concurrency 12 --rounds 2 --output "$E/upload-memory-c12.json"
|
||||
# --- регрессия lab3 ---
|
||||
run cursor-validation python3 student-tests/cursor_validation.py
|
||||
run idempotency-concurrency python3 student-tests/idempotency_concurrency.py --output "$E/idempotency-concurrency.json"
|
||||
T=$(docker compose ps -q api | head -1 | cut -c1-12)
|
||||
run failover-bench python3 student-tests/failover_bench.py --action "env TARGET_INSTANCE_ID=$T scripts/stop-one.sh" \
|
||||
--target-instance "$T" --duration 20 --action-at 5 --concurrency 4 --output "$E/failover-bench.json"
|
||||
./scripts/start-all.sh >/dev/null 2>&1
|
||||
NEXT=$(( $(grep -E '^APP_VERSION=' .env | cut -d= -f2) + 1 ))
|
||||
run rolling-update sh -c "./scripts/rolling-update.sh $NEXT && make test"
|
||||
run janitor-dry-run docker compose exec -T janitor python /app/src/janitor.py --once --dry-run
|
||||
run queues docker compose exec -T broker rabbitmqctl -q -p messenger list_queues name type durable messages consumers
|
||||
run failed-registry docker compose --profile tools run --rm -T ops failed --limit 10
|
||||
run login-flood python3 student-tests/login_flood.py --output "$E/login-flood.json" # последним: исчерпывает лимит входов
|
||||
echo "overall=$status"
|
||||
exit $status
|
||||
|
||||
Reference in New Issue
Block a user