forked from mtusi2026/mtusi2026lab2
sulution 2 lab
This commit is contained in:
@@ -4,10 +4,10 @@ CA_FILE ?=
|
||||
ACTION_SCRIPT ?=
|
||||
TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",)
|
||||
|
||||
.PHONY: help check validate test load test-persistence
|
||||
.PHONY: help check validate test load test-persistence test-grade4 test-grade4-expiry test-grade4-redis test-grade4-postgres compose-up compose-down
|
||||
|
||||
help:
|
||||
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
|
||||
@echo "check: offline structure; validate: OpenAPI; test: public API; test-persistence: restart persistence; test-grade4: custom lab2 checks"
|
||||
|
||||
check:
|
||||
$(PYTHON) scripts/check_contract.py
|
||||
@@ -24,3 +24,21 @@ 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)
|
||||
|
||||
test-grade4:
|
||||
$(PYTHON) student-tests/lab2.py --base-url "$(BASE_URL)"
|
||||
|
||||
test-grade4-expiry:
|
||||
$(PYTHON) student-tests/lab2.py --base-url "$(BASE_URL)" --check-expiry
|
||||
|
||||
test-grade4-redis:
|
||||
$(PYTHON) student-tests/lab2.py --base-url "$(BASE_URL)" --check-redis
|
||||
|
||||
test-grade4-postgres:
|
||||
$(PYTHON) student-tests/lab2.py --base-url "$(BASE_URL)" --check-postgres
|
||||
|
||||
compose-up:
|
||||
docker compose --env-file .env up -d --build
|
||||
|
||||
compose-down:
|
||||
docker compose --env-file .env down
|
||||
|
||||
Reference in New Issue
Block a user