fix: pass all args to cargo test in integration test script

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
master
oabrivard 3 months ago
parent bb2209e425
commit cda9e2fc25

@ -4,8 +4,13 @@
# Starts a Postgres container, runs tests, then cleans up. # Starts a Postgres container, runs tests, then cleans up.
# #
# Usage: # Usage:
# ./scripts/run-integration-tests.sh # run all integration tests # ./scripts/run-integration-tests.sh # all tests
# ./scripts/run-integration-tests.sh pipeline # run only pipeline_test # ./scripts/run-integration-tests.sh --test pipeline_test # one test file
# ./scripts/run-integration-tests.sh --test api_admin_test config_providers # one test by name
# ./scripts/run-integration-tests.sh --test api_admin_test -- --test-threads=1 # extra cargo args
# ./scripts/run-integration-tests.sh --lib # unit tests only
#
# All arguments are passed directly to `cargo test`.
# #
set -euo pipefail set -euo pipefail
@ -58,11 +63,11 @@ echo "=== Running integration tests ==="
cd "$PROJECT_DIR/backend" cd "$PROJECT_DIR/backend"
if [ $# -gt 0 ]; then if [ $# -gt 0 ]; then
echo "Running: cargo test --test $1 -- --nocapture" echo "Running: cargo test $*"
cargo test --test "$1" -- --nocapture cargo test "$@"
else else
echo "Running: cargo test (all integration + unit tests)" echo "Running: cargo test (all integration + unit tests)"
cargo test -- --nocapture cargo test
fi fi
echo "=== All tests passed ===" echo "=== All tests passed ==="

Loading…
Cancel
Save