forked from mtusi2026/mtusi2026lab5
Implement lab5 async image processing with RabbitMQ and outbox
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
ifeq ($(OS),Windows_NT)
|
||||
PYTHON ?= python
|
||||
else
|
||||
PYTHON ?= python3
|
||||
endif
|
||||
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
|
||||
.PHONY: help check validate test load test-persistence test-failover test-own
|
||||
|
||||
help:
|
||||
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
|
||||
@@ -22,9 +26,14 @@ 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) -c "import pathlib,sys; sys.exit(0 if pathlib.Path(sys.argv[1]).is_file() else 2)" "$(ACTION_SCRIPT)"
|
||||
$(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) -c "import pathlib,sys; sys.exit(0 if pathlib.Path(sys.argv[1]).is_file() else 2)" "$(ACTION_SCRIPT)"
|
||||
$(PYTHON) tests/resilience.py --mode failover --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS)
|
||||
|
||||
test-own:
|
||||
$(PYTHON) tests/own_unit.py
|
||||
$(PYTHON) tests/idempotency_parallel.py
|
||||
$(PYTHON) tests/attachments_negative.py
|
||||
|
||||
Reference in New Issue
Block a user