forked from mtusi2026/mtusi2026lab2
реализован уровень 4
This commit is contained in:
@@ -25,9 +25,16 @@ COMPOSE_CMD = $(COMPOSE) --env-file "$(ENV_FILE)"
|
||||
test \
|
||||
load \
|
||||
test-persistence \
|
||||
test-level4-transactions \
|
||||
test-session-security \
|
||||
test-cache-fallback \
|
||||
test-database-failure \
|
||||
explain-history \
|
||||
test-level4 \
|
||||
compose-config \
|
||||
compose-build \
|
||||
compose-up \
|
||||
compose-tools-up \
|
||||
compose-down \
|
||||
compose-ps \
|
||||
compose-logs
|
||||
@@ -46,9 +53,16 @@ help:
|
||||
@echo "test: run public smoke test against a running API"
|
||||
@echo "load: run synthetic load against a running API"
|
||||
@echo "test-persistence: run persistence test with ACTION_SCRIPT"
|
||||
@echo "test-level4-transactions: verify username race and chat rollback"
|
||||
@echo "test-session-security: verify short TTL, wrong password and logout"
|
||||
@echo "test-cache-fallback: verify API fallback while Redis is stopped"
|
||||
@echo "test-database-failure: verify bounded errors while PostgreSQL is stopped"
|
||||
@echo "explain-history: run EXPLAIN on a rolled-back 10000-message fixture"
|
||||
@echo "test-level4: run the complete cumulative level 4 verification"
|
||||
@echo "compose-config: validate resolved Compose configuration"
|
||||
@echo "compose-build: build application images"
|
||||
@echo "compose-up: start the stack"
|
||||
@echo "compose-tools-up: start optional Redis Insight"
|
||||
@echo "compose-down: stop the stack without deleting volumes"
|
||||
@echo "compose-ps: show stack containers"
|
||||
@echo "compose-logs: follow stack logs"
|
||||
@@ -108,6 +122,46 @@ test-persistence:
|
||||
--base-url "$(BASE_URL)" \
|
||||
$(TLS_ARGS)
|
||||
|
||||
test-level4-transactions:
|
||||
$(PYTHON) tests/level4_transactions.py \
|
||||
--base-url "$(BASE_URL)" \
|
||||
$(TLS_ARGS)
|
||||
|
||||
test-session-security:
|
||||
$(PYTHON) tests/session_security.py \
|
||||
--action-script "scripts/session_ttl.sh" \
|
||||
--ttl-seconds 2 \
|
||||
--base-url "$(BASE_URL)" \
|
||||
$(TLS_ARGS)
|
||||
|
||||
test-cache-fallback:
|
||||
$(PYTHON) tests/cache_resilience.py \
|
||||
--action-script "scripts/redis_outage.sh" \
|
||||
--base-url "$(BASE_URL)" \
|
||||
$(TLS_ARGS)
|
||||
|
||||
test-database-failure:
|
||||
$(PYTHON) tests/database_resilience.py \
|
||||
--action-script "scripts/postgres_outage.sh" \
|
||||
--base-url "$(BASE_URL)" \
|
||||
$(TLS_ARGS)
|
||||
|
||||
explain-history:
|
||||
scripts/explain_history.sh
|
||||
|
||||
test-level4:
|
||||
$(MAKE) go-check
|
||||
$(MAKE) check
|
||||
$(MAKE) validate
|
||||
$(MAKE) compose-config
|
||||
$(MAKE) test
|
||||
$(MAKE) test-level4-transactions
|
||||
$(MAKE) test-session-security
|
||||
$(MAKE) test-cache-fallback
|
||||
$(MAKE) test-database-failure
|
||||
$(MAKE) test-persistence ACTION_SCRIPT=scripts/restart.sh
|
||||
$(MAKE) explain-history
|
||||
|
||||
compose-config:
|
||||
@test -f "$(ENV_FILE)" || \
|
||||
(echo "$(ENV_FILE) is missing; run: make init-env"; exit 2)
|
||||
@@ -119,6 +173,9 @@ compose-build:
|
||||
compose-up:
|
||||
$(COMPOSE_CMD) up -d --build
|
||||
|
||||
compose-tools-up:
|
||||
$(COMPOSE_CMD) --profile tools up -d redis-insight
|
||||
|
||||
compose-down:
|
||||
$(COMPOSE_CMD) down
|
||||
|
||||
@@ -126,4 +183,4 @@ compose-ps:
|
||||
$(COMPOSE_CMD) ps
|
||||
|
||||
compose-logs:
|
||||
$(COMPOSE_CMD) logs --follow
|
||||
$(COMPOSE_CMD) logs --follow
|
||||
|
||||
Reference in New Issue
Block a user