Перенос минимума из lab2

This commit is contained in:
2026-11-05 18:00:36 +03:00
parent 0ab3a341aa
commit 4303783848
24 changed files with 3359 additions and 8 deletions
+7 -8
View File
@@ -4,10 +4,10 @@ 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-own test-persistence
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); test: running API; load: synthetic writes; test-own: Go tests"
check:
$(PYTHON) scripts/check_contract.py
@@ -21,10 +21,9 @@ test:
load:
$(PYTHON) tests/load.py --base-url "$(BASE_URL)" $(TLS_ARGS)
test-persistence:
@test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT to your implemented executable restart hook"; exit 2)
$(PYTHON) tests/resilience.py --mode persistence --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS)
test-own:
go test ./...
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-persistence:
test -n "$(ACTION_SCRIPT)"
$(PYTHON) tests/resilience.py --base-url "$(BASE_URL)" --mode persistence --action-script "$(ACTION_SCRIPT)" $(TLS_ARGS)