forked from mtusi2026/mtusi2026lab7
test: verify security boundaries and recovery
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
|
||||
set -eu
|
||||
|
||||
env_file=${ENV_FILE:-lab6.env.example}
|
||||
base_url=${BASE_URL:-http://127.0.0.1:8080}
|
||||
env_file=${ENV_FILE:-lab7.env.example}
|
||||
base_url=${BASE_URL:-https://localhost:8443}
|
||||
ca_file=${CA_FILE:-.runtime/security/public-ca/ca.crt}
|
||||
prometheus_url=${PROMETHEUS_URL:-http://127.0.0.1:9090}
|
||||
evidence_root=${EVIDENCE_DIR:-evidence/runtime}
|
||||
outage_seconds=${TELEMETRY_OUTAGE_SECONDS:-30}
|
||||
@@ -30,6 +31,7 @@ started_at=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
compose stop tempo loki >/dev/null
|
||||
python3 scripts/lab6-traffic.py \
|
||||
--base-url "$base_url" \
|
||||
--ca-file "$ca_file" \
|
||||
--mode mixed \
|
||||
--duration "$outage_seconds" \
|
||||
--concurrency 4 \
|
||||
@@ -41,7 +43,7 @@ load_pid=$!
|
||||
sleep "$outage_seconds"
|
||||
wait "$load_pid"
|
||||
load_pid=
|
||||
health_code=$(curl --silent --output /dev/null --write-out '%{http_code}' "$base_url/health/ready")
|
||||
health_code=$(curl --silent --output /dev/null --write-out '%{http_code}' --cacert "$ca_file" "$base_url/health/ready")
|
||||
python3 scripts/lab6-observe.py --prometheus-url "$prometheus_url" --phase degraded --output "$output_dir/degraded.json" >/dev/null
|
||||
recovery_started_at=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
compose up -d --wait --wait-timeout 90 tempo loki >/dev/null
|
||||
|
||||
Reference in New Issue
Block a user