Implement lab2 PostgreSQL messenger, sessions, SQL research and defense guide

This commit is contained in:
2026-10-02 12:49:09 +03:00
parent 65003b6119
commit 6fe56ec642
43 changed files with 12869 additions and 33 deletions
+25 -1
View File
@@ -1,5 +1,5 @@
PYTHON ?= python3
BASE_URL ?= http://localhost:8080
BASE_URL ?= http://localhost:8082
CA_FILE ?=
ACTION_SCRIPT ?=
TLS_ARGS = $(if $(CA_FILE),--ca-file "$(CA_FILE)",)
@@ -24,3 +24,27 @@ 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)
.PHONY: bootstrap up down test-student experiment
bootstrap:
$(PYTHON) scripts/bootstrap.py
up: bootstrap
docker compose --env-file .env up -d --build --wait
down:
docker compose --env-file .env down
test-student:
go test -race -count=1 -v ./...
$(PYTHON) student-tests/integration.py --base-url "$(BASE_URL)"
experiment:
$(PYTHON) student-tests/experiment.py
.PHONY: test-race
test-race:
docker compose --env-file .env --profile verify run --build --rm tests
.PHONY: test-docker
test-docker:
$(PYTHON) student-tests/lifecycle.py --base-url "$(BASE_URL)"