- platform/test/e2e-phase5b.js (32 checks): program seed, entitlement gating (pending/future/expired/cancelled), cross-student isolation, real Lab launch/destroy/ reaper-reconciliation/recreate persistence, server-derived idempotent completion via a full real capstone completion, the integration boundary (auth, idempotency, real concurrency, unknown/inactive program rejection, minor/no-email path, no card data), RBAC scoping, a regression test for the process-crash bug this suite found, Phase 5A smoke, and a real Platform API restart. - infra/scripts/drills/test-phase5b-selfpaced-rehearsal.js (15 checks): one continuous story — activation, a simulated website enrollment event, real Lab work, Lab destroy, a new session, Continue Learning, a fresh Lab, full real capstone completion, Completed transition, and a second uninvolved student proven unable to reach any of it.
34 lines
1.5 KiB
Bash
Executable File
34 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Orchestrates the Phase 5B §18 self-paced dress rehearsal: brings up the real dev stack,
|
|
# bootstraps an owner, runs test-phase5b-selfpaced-rehearsal.js, tears down.
|
|
set -euo pipefail
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/../../../platform"
|
|
|
|
export PROVISIONER_SHARED_SECRET="${PROVISIONER_SHARED_SECRET:-rehearsal-shared-secret-not-for-production}"
|
|
export INTEGRATION_SHARED_SECRET="${INTEGRATION_SHARED_SECRET:-dev-integration-secret-not-for-production}"
|
|
|
|
docker compose -f docker-compose.dev.yml up -d --build
|
|
|
|
cleanup() {
|
|
echo "==> Tearing down"
|
|
docker ps -aq --filter "name=rootnode-lab-" | xargs -r docker rm -f >/dev/null 2>&1 || true
|
|
docker network ls --filter "name=rootnode-lab-net-" --format "{{.Name}}" | xargs -r -n1 docker network rm >/dev/null 2>&1 || true
|
|
docker compose -f docker-compose.dev.yml down >/dev/null 2>&1 || true
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
echo "==> Waiting for the stack"
|
|
for _ in $(seq 1 60); do
|
|
curl -sf http://localhost:4300/healthz >/dev/null 2>&1 && curl -sf http://localhost:4200/healthz >/dev/null 2>&1 && break
|
|
sleep 2
|
|
done
|
|
|
|
echo "==> Bootstrapping the rehearsal owner"
|
|
( cd api && PLATFORM_DB_URL=postgres://postgres:postgres@localhost:5433/rootnode_platform \
|
|
node bootstrap-owner.js [email protected] "P5B Rehearsal Owner" 'RehearsalPass!2026' )
|
|
|
|
echo "==> Running the rehearsal"
|
|
OWNER_EMAIL=[email protected] OWNER_PASSWORD='RehearsalPass!2026' \
|
|
INTEGRATION_KEY="$INTEGRATION_SHARED_SECRET" \
|
|
node ../infra/scripts/drills/test-phase5b-selfpaced-rehearsal.js
|