Метаданные в PostgreSQL, байты в приватном bucket; sync upload 201 ready; компенсация orphan и cmd/reconcile с dry-run/apply и grace period.
51 lines
1.5 KiB
Makefile
51 lines
1.5 KiB
Makefile
PYTHON ?= python3
|
|
BASE_URL ?= http://localhost:8080
|
|
CA_FILE ?=
|
|
ACTION_SCRIPT ?=
|
|
TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",)
|
|
|
|
.PHONY: help check validate test load test-persistence test-failover up down student-test private-bucket concurrent reconcile-demo
|
|
|
|
help:
|
|
@echo "check: offline structure; validate: full OpenAPI; test: smoke; up/down: compose stand"
|
|
|
|
check:
|
|
$(PYTHON) scripts/check_contract.py
|
|
|
|
validate:
|
|
$(PYTHON) scripts/validate_openapi.py
|
|
|
|
test:
|
|
$(PYTHON) tests/smoke.py --base-url "$(BASE_URL)" $(TLS_ARGS)
|
|
|
|
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-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)
|
|
|
|
up:
|
|
bash scripts/up.sh
|
|
|
|
down:
|
|
docker compose --env-file .env down
|
|
|
|
student-test:
|
|
DATABASE_URL=postgres://messenger:messenger@127.0.0.1:5432/messenger?sslmode=disable \
|
|
REDIS_URL=redis://127.0.0.1:6379/0 \
|
|
go test ./student-tests/ -count=1 -v
|
|
|
|
private-bucket:
|
|
bash scripts/check-private-bucket.sh
|
|
|
|
concurrent:
|
|
bash scripts/concurrent-uploads.sh
|
|
|
|
reconcile-demo:
|
|
bash scripts/reconcile-demo.sh
|