This commit is contained in:
@@ -4,18 +4,22 @@ CA_FILE ?=
|
||||
ACTION_SCRIPT ?=
|
||||
COMPOSE = docker compose --env-file .env
|
||||
TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",)
|
||||
RUN_ID ?=
|
||||
TRACK2 = $(PYTHON) src/experiments/track2/run.py
|
||||
|
||||
.PHONY: help app-up app-down app-logs check validate test test-backend load test-persistence
|
||||
|
||||
help:
|
||||
@echo "app-up: build and start API, database and frontend (http://localhost:5173)"
|
||||
@echo "app-down: stop the application and keep PostgreSQL data"
|
||||
@echo "track2-run RUN_ID=<unique-name>: isolated query, write and backup/restore experiment"
|
||||
@echo "track2-status / track2-stop / track2-clean RUN_ID=<name>: inspect, stop or delete only experiment volumes; archives remain"
|
||||
@echo "app-up: build and start API, PostgreSQL, Redis and frontend (http://localhost:5173)"
|
||||
@echo "app-down: stop the application and keep PostgreSQL and Redis data"
|
||||
@echo "app-logs: follow service logs"
|
||||
@echo "check: offline contract structure"
|
||||
@echo "validate: full OpenAPI validation (install requirements-dev.txt first)"
|
||||
@echo "test: public API smoke test (run app-up first)"
|
||||
@echo "test-backend: Go tests with PostgreSQL and race detection in isolated schemas"
|
||||
@echo "test-persistence ACTION_SCRIPT=scripts/restart.sh: restart API and DB, verify saved data and session (run app-up first)"
|
||||
@echo "test-backend: Go race tests with PostgreSQL and Redis in isolated schemas"
|
||||
@echo "test-persistence ACTION_SCRIPT=scripts/restart.sh: restart API, PostgreSQL and Redis; verify data and session (run app-up first)"
|
||||
@echo "load: synthetic API writes"
|
||||
|
||||
app-up:
|
||||
@@ -45,3 +49,16 @@ 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)
|
||||
|
||||
.PHONY: track2-run track2-status track2-stop track2-clean
|
||||
track2-run:
|
||||
$(TRACK2) run --run-id "$(RUN_ID)"
|
||||
|
||||
track2-status:
|
||||
$(TRACK2) status --run-id "$(RUN_ID)"
|
||||
|
||||
track2-stop:
|
||||
$(TRACK2) stop --run-id "$(RUN_ID)"
|
||||
|
||||
track2-clean:
|
||||
$(TRACK2) clean --run-id "$(RUN_ID)"
|
||||
|
||||
Reference in New Issue
Block a user