#!/usr/bin/env bash # Regenerates every file under output/. # # ./scripts/run-all.sh # # Needs JDK 25, Maven 3.9, redis-server and redis-cli (7.x) on the PATH, and a PostgreSQL 14+ that # the application can reach (IDEM_DB_URL / IDEM_DB_USER / IDEM_DB_PASSWORD, default # jdbc:postgresql://localhost:5432/idem as idem/idem). The tests start a throwaway redis-server on a # free port; they do truncate the payments and idempotency_keys tables in that database. # Transcripts 01-08 come out of the test suite, so each line in them is an assertion that fails the # build when it stops being true. Transcript 00 is psql, run by scripts/timezone-trap.sh. set -euo pipefail cd "$(dirname "$0")/.." mkdir -p output echo "== time zone trap (transcript 00)" ./scripts/timezone-trap.sh >/dev/null || true echo "== test suite (transcripts 01-08, two stores)" mvn -B test | tee /tmp/idempotency-mvn.log | grep -E '^\[(INFO|WARNING|ERROR)\] Tests run:' | sed 's/^\[[A-Z]*\] //' > output/09-test-summary.txt echo echo "output:" ls -1 output