#!/usr/bin/env bash # # Local convenience: run the ACL integration test against a throwaway OpenZaak-only # stack (fast iteration on the ACL gateway). Brings OpenZaak up, runs the shared # stack-agnostic check (infra/run-acl-integration.sh), then always tears down. # # CI does not use this — there the full stack is brought up once and the same runner # is invoked as a step (see the `verify-stack` job / Makefile `verify-*`). See ADR-0006. set -euo pipefail here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" OZ_COMPOSE="$here/openzaak/docker-compose.yml" cleanup() { docker compose -f "$OZ_COMPOSE" down --volumes >/dev/null 2>&1 || true docker volume rm -f rr-oz-config >/dev/null 2>&1 || true } trap cleanup EXIT echo ">> bringing OpenZaak up" bash "$here/seed-config.sh" oz docker compose -f "$OZ_COMPOSE" up -d echo ">> waiting for the OpenZaak API container to be healthy" for _ in $(seq 1 140); do oz="$(docker ps -q --filter 'name=[-_]openzaak[-_]' | head -1)" if [ -n "$oz" ] && [ "$(docker inspect -f '{{if .State.Health}}{{.State.Health.Status}}{{end}}' "$oz" 2>/dev/null || true)" = healthy ]; then break fi sleep 3 done [ -n "${oz:-}" ] || { echo "ERROR: OpenZaak never came up" >&2; exit 1; } bash "$here/run-acl-integration.sh"