ЛР2: PostgreSQL, сессии и Valkey на оценку 4

This commit is contained in:
gera
2026-10-16 00:50:33 +03:00
parent 65003b6119
commit f612fbef77
32 changed files with 2339 additions and 21 deletions
+21 -2
View File
@@ -4,10 +4,11 @@ CA_FILE ?=
ACTION_SCRIPT ?=
TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",)
.PHONY: help check validate test load test-persistence
.PHONY: help check validate test load test-persistence test-own test-race test-rollback test-expiry test-deps explain
help:
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
@echo "check: offline structure; validate: full OpenAPI; test: running API"
@echo "test-own/race/rollback/expiry/deps/explain: grade-4 student checks"
check:
$(PYTHON) scripts/check_contract.py
@@ -24,3 +25,21 @@ load:
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:
BASE_URL="$(BASE_URL)" $(PYTHON) tests/test_own.py -v
test-race:
BASE_URL="$(BASE_URL)" $(PYTHON) tests/test_race_register.py
test-rollback:
BASE_URL="$(BASE_URL)" $(PYTHON) tests/test_rollback.py
test-expiry:
./scripts/test-expiry.sh
test-deps:
./scripts/test-deps-down.sh
explain:
./scripts/explain.sh evidence/explain.txt