ЛР7 на 4: HTTPS, mTLS, OpenBao AppRole и ротация leaf.
Skeleton contracts / contracts (pull_request) Blocked by required conditions
Skeleton contracts / contracts (pull_request) Blocked by required conditions
Smoke/security/grade4/persistence/failover пройдены; REPORT и DEFENSE.
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
PYTHON ?= python3
|
||||
BASE_URL ?= https://localhost:8443
|
||||
CA_FILE ?=
|
||||
BASE_URL ?= https://127.0.0.1:8443
|
||||
CA_FILE ?= secrets/ca.crt
|
||||
ACTION_SCRIPT ?=
|
||||
TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",)
|
||||
COMPOSE ?= docker compose -p gavrilenko-lab7 --env-file .env
|
||||
GO ?= go
|
||||
|
||||
.PHONY: help check validate test load test-persistence test-failover test-security
|
||||
.PHONY: help check validate test load test-persistence test-failover test-security up down observability-test student-test grade4
|
||||
|
||||
help:
|
||||
@echo "check: offline structure; validate: full OpenAPI (requirements-dev.txt); test: running API; load: synthetic writes"
|
||||
@echo "up/down; make test; make observability-test; student-test"
|
||||
|
||||
up:
|
||||
bash scripts/up.sh
|
||||
|
||||
down:
|
||||
$(COMPOSE) down
|
||||
|
||||
check:
|
||||
$(PYTHON) scripts/check_contract.py
|
||||
@@ -22,12 +30,23 @@ 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)
|
||||
@test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT"; 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)
|
||||
@test -n "$(ACTION_SCRIPT)" || (echo "Set ACTION_SCRIPT"; exit 2)
|
||||
$(PYTHON) tests/resilience.py --mode failover --action-script "$(ACTION_SCRIPT)" --base-url "$(BASE_URL)" $(TLS_ARGS)
|
||||
|
||||
test-security:
|
||||
$(PYTHON) tests/security.py --base-url "$(BASE_URL)" $(TLS_ARGS)
|
||||
|
||||
grade4: check validate test test-security
|
||||
$(GO) test ./student-tests/... -run 'MTLS|OpenBao|Argon|ACL' -count=1 -timeout=10m
|
||||
|
||||
observability-test:
|
||||
BASE_URL=$(BASE_URL) PROMETHEUS_URL=http://127.0.0.1:9107 TEMPO_URL=http://127.0.0.1:3217 LOKI_URL=http://127.0.0.1:3117 \
|
||||
$(PYTHON) student-tests/observability.py
|
||||
|
||||
student-test: contract-go worker-go pipeline-go
|
||||
|
||||
include student.mk
|
||||
Reference in New Issue
Block a user