forked from mtusi2026/mtusi2026lab4
ЛР4: S3-хранилище (MinIO) и вложения
This commit is contained in:
@@ -4,7 +4,8 @@ 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-persistence test-failover \
|
||||
test-student test-attachments test-orphans test-s3-outage test-upload-memory check-s3-private evidence
|
||||
|
||||
help:
|
||||
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
|
||||
@@ -28,3 +29,28 @@ test-persistence:
|
||||
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)
|
||||
|
||||
# ---- lab4: собственные проверки (стенд должен быть запущен) ----
|
||||
test-student:
|
||||
$(PYTHON) student-tests/run.py --base-url "$(BASE_URL)"
|
||||
$(PYTHON) student-tests/idempotency.py --base-url "$(BASE_URL)"
|
||||
|
||||
test-attachments:
|
||||
$(PYTHON) student-tests/attachments.py --base-url "$(BASE_URL)"
|
||||
|
||||
# Нужна реплика с внедрением отказов: docker compose --env-file .env --profile fault up -d api-fault
|
||||
test-orphans:
|
||||
$(PYTHON) student-tests/orphans.py --base-url "$(BASE_URL)" --fault-url http://localhost:8082
|
||||
|
||||
test-s3-outage:
|
||||
$(PYTHON) student-tests/s3_outage.py --base-url "$(BASE_URL)"
|
||||
|
||||
test-upload-memory:
|
||||
$(PYTHON) student-tests/upload_memory.py --base-url "$(BASE_URL)" --concurrency 10 --output evidence/upload-memory-10.json
|
||||
|
||||
check-s3-private:
|
||||
sh scripts/check-s3-private.sh
|
||||
|
||||
# Все проверки lab4 подряд с сохранением вывода в evidence/ (кроссплатформенно, Python)
|
||||
evidence:
|
||||
$(PYTHON) student-tests/collect_evidence.py --base-url "$(BASE_URL)"
|
||||
|
||||
Reference in New Issue
Block a user