feat: implement lab3 API load balancing and failover

This commit is contained in:
sashadugina06
2026-11-06 01:43:33 +03:00
parent 0ab3a341aa
commit 7088791d5c
116 changed files with 7971 additions and 38 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
export BASE_URL="${BASE_URL:-http://localhost:$(sed -n 's/^PUBLIC_PORT=//p' .env)}"
make check > evidence/check.txt 2>&1
make validate PYTHON=.venv/bin/python > evidence/validate.txt 2>&1
make test > evidence/smoke.txt 2>&1
python3 student-tests/check_auth.py > evidence/auth.txt 2>&1
python3 student-tests/scenarios.py idempotency --output evidence/idempotency.json
python3 scripts/capture-state.py > evidence/persistence-containers-before.json
make test-persistence ACTION_SCRIPT=scripts/restart.sh > evidence/persistence.txt 2>&1
python3 scripts/wait-ready.py
python3 scripts/capture-state.py > evidence/persistence-containers-after.json
make test-failover ACTION_SCRIPT=scripts/stop-one.sh > evidence/failover-public.txt 2>&1
scripts/restore.sh
python3 scripts/wait-ready.py
python3 student-tests/scenarios.py failover --target-index 0 --output evidence/failover-replica-1.json
python3 student-tests/scenarios.py failover --target-index 1 --output evidence/failover-replica-2.json
python3 student-tests/baseline.py
python3 student-tests/scenarios.py rolling --output evidence/rolling-update.json
python3 student-tests/dns.py
python3 student-tests/readiness.py
python3 scripts/summarize-resources.py
python3 scripts/capture-state.py > evidence/containers.json
scripts/compose.sh ps -a > evidence/containers.txt