#!/usr/bin/env bash # Populates the running test stack with realm users + FedWiki identity # fixtures. Run after `docker compose up -d` brings the stack up. # # Idempotent: seed-keycloak.sh is no-op when entities already exist; # render.sh re-templates against the current realm state. Re-run any # time the realm is reseeded or KC volume is wiped. set -euo pipefail REPO_ROOT="$(git rev-parse --show-toplevel)" TEST_DIR="${REPO_ROOT}/test" cd "$TEST_DIR" echo "==> Seeding Keycloak realm..." ./seed/keycloak/seed-keycloak.sh echo echo "==> Rendering FedWiki identity fixtures..." ./seed/fedwiki/render.sh echo echo "==> Restarting fedwiki to pick up rendered config.json..." docker compose restart fedwiki echo echo "Stack seeded."