The bingo card ran inside the asxpio container, dispatched by Host. Give the public site its own repo, image and deploy so it can be released and mirrored independently of asxp.io. Editing stays in the asxp.io admin, which keeps owning the schema and the photo pipeline; this app only reads the shared bingo tables and the bingo/ photos, through a read-only DB role and MinIO user. Tests load a snapshot of the asxpio-built schema (test/schema.sql). Assisted-by: Claude:opus-5
19 lines
794 B
Bash
Executable file
19 lines
794 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Full test suite against an ephemeral Postgres. Run inside `nix develop`
|
|
# (needs initdb/pg_ctl from the dev shell). Without a database you can still
|
|
# run `bundle exec rake test` — DB-backed tests skip.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
PORT="${TEST_PG_PORT:-54329}"
|
|
TMP="$(mktemp -d)"
|
|
trap 'pg_ctl -D "$TMP/pg" stop -m immediate >/dev/null 2>&1 || true; rm -rf "$TMP"' EXIT
|
|
|
|
initdb -D "$TMP/pg" -A trust -U postgres >/dev/null
|
|
printf "unix_socket_directories = ''\nlisten_addresses = '127.0.0.1'\nport = %s\n" "$PORT" \
|
|
>> "$TMP/pg/postgresql.conf"
|
|
pg_ctl -D "$TMP/pg" -l "$TMP/pg.log" start >/dev/null
|
|
createdb -h 127.0.0.1 -p "$PORT" -U postgres bingo_test
|
|
|
|
TEST_DATABASE_URL="postgres://postgres@127.0.0.1:$PORT/bingo_test" \
|
|
bundle exec rake test "$@"
|