Files
member-console/test/seed-demo.sh
T
cgalo5758 ee23d31c97 Complete anatomy sweep across all surfaces
Rebuild every operator, member, and integration template on the shared
page-anatomy parts, empty the lint allowlist, and move the confirm modal
into both shells. Replace back links with location trails and make row
identifiers the primary link. Make screen captures deterministic by
resetting the app database from a pinned demo snapshot. Send the logout
id_token_hint only while valid.
2026-08-31 18:11:09 -05:00

38 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
#
# test/seed-demo.sh — host-side invocation of the member-console demo seeder.
#
# Loads the worktree-isolated env (DB port, DSN) from test/.env and runs
# `go run . seed-demo --config test/mc-config.yaml` from the repo root.
#
# Opt-in only: the default bootstrap-stack.sh + docker compose up workflow
# does NOT invoke this. Use it before walking the operator UI for M7-7a.
#
# Idempotent — re-running is a no-op. The database generates every ID; the
# seeder finds the rows it already created by their `key` and skips them.
# Person rows for bob/carlos/diana ARE seeded, through the app's own signup
# path, each carrying as its OIDC subject the literal `sub` the Keycloak seed
# pins for that username (test/seed/keycloak/seed-keycloak.sh). Alice is left
# to lazy-create on her first login.
#
# See openspec/changes/2026-05-10-member-console-demo-seeder/ for design.
set -euo pipefail
here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
repo_root="$(cd "$here/.." && pwd)"
env_file="$here/.env"
if [[ ! -f "$env_file" ]]; then
echo "error: $env_file not found. Run ./bootstrap-stack.sh first." >&2
exit 1
fi
set -a
# shellcheck source=/dev/null
source "$env_file"
set +a
cd "$repo_root"
exec go run . seed-demo --config test/mc-config.yaml "$@"