Skeleton contracts / contracts (pull_request) Blocked by required conditions
Smoke/security/grade4/persistence/failover пройдены; REPORT и DEFENSE.
52 lines
1.5 KiB
Makefile
52 lines
1.5 KiB
Makefile
PYTHON ?= python3
|
|
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 up down observability-test student-test grade4
|
|
|
|
help:
|
|
@echo "up/down; make test; make observability-test; student-test"
|
|
|
|
up:
|
|
bash scripts/up.sh
|
|
|
|
down:
|
|
$(COMPOSE) down
|
|
|
|
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"; 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"; 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 |