Реализовать лабораторную 3 на оценку 5 (трек 1)

This commit is contained in:
Чиняева
2026-11-07 00:57:10 +03:00
parent 0ab3a341aa
commit 2c4f0a5a61
96 changed files with 7784 additions and 45 deletions
+41 -2
View File
@@ -4,10 +4,22 @@ CA_FILE ?=
ACTION_SCRIPT ?=
TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",)
.PHONY: help check validate test load test-persistence test-failover
.PHONY: help check validate up down test load test-persistence test-failover \
test-student test-expiry test-idempotency test-routing \
test-idempotency-persistence test-failover-matrix test-rolling test-track1
help:
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt)"
@echo "up/down: local compose stack; test: public smoke against running LB"
@echo "test-persistence ACTION_SCRIPT=scripts/restart.sh"
@echo "test-failover ACTION_SCRIPT=scripts/stop-one.sh"
@echo "test-student/test-expiry/test-idempotency/test-routing: extra checks"
up:
docker compose --env-file .env up -d --build
down:
docker compose --env-file .env down
check:
$(PYTHON) scripts/check_contract.py
@@ -28,3 +40,30 @@ test-persistence:
test-failover:
@test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable stop-one hook"; exit 2)
$(PYTHON) tests/resilience.py --mode failover --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS)
test-student:
$(PYTHON) student-tests/auth_negative.py --base-url "$(BASE_URL)"
$(PYTHON) student-tests/race_username.py --base-url "$(BASE_URL)"
$(PYTHON) student-tests/idempotency_race.py --base-url "$(BASE_URL)"
$(PYTHON) student-tests/instance_routing.py --base-url "$(BASE_URL)"
test-expiry:
$(PYTHON) student-tests/expiry.py --base-url "$(BASE_URL)"
test-idempotency:
$(PYTHON) student-tests/idempotency_race.py --base-url "$(BASE_URL)"
test-routing:
$(PYTHON) student-tests/instance_routing.py --base-url "$(BASE_URL)"
test-idempotency-persistence:
$(PYTHON) student-tests/idempotency_persistence.py --base-url "$(BASE_URL)"
test-failover-matrix:
$(PYTHON) student-tests/failover_matrix.py --base-url "$(BASE_URL)"
test-rolling:
$(PYTHON) student-tests/rolling_update.py --base-url "$(BASE_URL)"
test-track1:
$(PYTHON) student-tests/track1_experiment.py --base-url "$(BASE_URL)"