лаба 4

This commit is contained in:
2026-10-29 02:56:13 +03:00
parent f3bcdad9e8
commit 0ef8d739d7
19 changed files with 1900 additions and 58 deletions
+13 -1
View File
@@ -4,7 +4,7 @@ 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 test load test-persistence test-failover test-reconcile test-compensation reconcile reconcile-repair
help:
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
@@ -28,3 +28,15 @@ 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-reconcile:
docker compose exec -T api-1 python -m unittest discover -s tests -p 'test_reconcile.py' -v
test-compensation:
docker compose exec -T api-1 python -m unittest discover -s tests -p 'test_upload_compensation.py' -v
reconcile:
docker compose exec -T api-1 python -m scripts.reconcile
reconcile-repair:
docker compose exec -T api-1 python -m scripts.reconcile --repair