feat: add checks and limits for 4 grade

This commit is contained in:
TAskMAster339
2026-10-10 14:13:32 +03:00
parent 771951cad7
commit 6892af8842
8 changed files with 402 additions and 1 deletions
+12
View File
@@ -11,6 +11,7 @@ help:
@echo "app-up: prepare local environment, migrate, build and start HAProxy, two API replicas, PostgreSQL, Redis and frontend"
@echo "app-down: stop application; keep database and session volumes"
@echo "app-logs / app-status: inspect application"
@echo "app-rolling-update: build, migrate once and replace API replicas one by one; test-grade4: limits, idempotency, failures and rolling load"
@echo "test-backend: Go race tests against PostgreSQL and Redis"
@echo "test-baseline / test-baseline-persistence: transferred lab2 API; second target stops and starts lab3"
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
@@ -29,6 +30,17 @@ app-logs:
app-status:
$(COMPOSE) ps
.PHONY: app-rolling-update test-grade4
app-rolling-update:
$(COMPOSE) build api migrate
$(PYTHON) scripts/rolling_update.py
test-grade4:
$(PYTHON) scripts/check_resources.py
$(PYTHON) scripts/check_idempotency.py --base-url "$(BASE_URL)" $(TLS_ARGS)
$(PYTHON) scripts/check_failover.py --base-url "$(BASE_URL)" $(TLS_ARGS)
$(PYTHON) scripts/check_rolling.py --base-url "$(BASE_URL)" $(TLS_ARGS)
test-backend:
$(COMPOSE) --profile test run --build --rm backend-tests