Files
mtusi2026lab2/scripts/check-expiry.sh
T

13 lines
484 B
Bash
Executable File

#!/bin/sh
set -eu
# Prove session expiry with a SHORT SESSION_TTL_SECONDS on a throwaway stack.
# The main stand can stay up; this uses a second compose project on port 8081.
cd "$(dirname "$0")/.."
export SESSION_TTL_SECONDS=2
export PUBLISH_PORT=8081
PROJECT=mtusi2expiry
cleanup() { docker compose -p "$PROJECT" down -v >/dev/null 2>&1 || true; }
trap cleanup EXIT
docker compose -p "$PROJECT" up -d --build
python3 scripts/expiry_probe.py --base-url http://localhost:8081 --ttl 2