diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index 79fa133..006fd30 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -1,4 +1,11 @@ #!/usr/bin/env bash set -euo pipefail cd "$(dirname "${BASH_SOURCE[0]}")/.." + +# Drop containers AND volumes from any prior run. The test-db image only runs +# /docker-entrypoint-initdb.d on a fresh data directory; reusing the volume +# silently skips schema migrations and produces phantom "relation does not +# exist" failures (e.g. detection_classes, resources). Always start clean. +docker compose -f docker-compose.test.yml down -v --remove-orphans + docker compose -f docker-compose.test.yml up --build --abort-on-container-exit --exit-code-from e2e-consumer --attach e2e-consumer