test: keep the trigger fixture scripts correct now that sqs is unignored

Review nits. The fixture scripts do exist under backend/tests/fixtures --
the doc path was relative to backend/, and I had wrongly concluded they
were missing -- so restore the quick-start pointer instead of dropping it.

Both scripts advertised '-- --ignored', which now silently runs zero tests
for sqs, and every documented invocation omitted -p and failed with 'no
test target named trigger_e2e'. Pin localstack to 3.8 to match CI.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alex Petric
2026-09-21 13:32:53 -04:00
co-authored by Claude Opus 5
parent ee1de09a9e
commit 1861c19d40
3 changed files with 26 additions and 17 deletions
+6 -3
View File
@@ -48,11 +48,14 @@ echo "All services ready. Run the e2e tests with:"
echo ""
if [[ "$ACTION" == "oss" ]]; then
echo " cargo test --test trigger_e2e --features mqtt_trigger,websocket,postgres_trigger -- --ignored --nocapture"
echo " cargo test -p windmill-api-integration-tests --test trigger_e2e --features mqtt_trigger,websocket,postgres_trigger -- --ignored --nocapture"
else
echo " # OSS triggers"
echo " cargo test --test trigger_e2e --features mqtt_trigger,websocket,postgres_trigger -- --ignored --nocapture"
echo " cargo test -p windmill-api-integration-tests --test trigger_e2e --features mqtt_trigger,websocket,postgres_trigger -- --ignored --nocapture"
echo ""
echo " # Enterprise triggers"
echo " AWS_ENDPOINT_URL=http://localhost:4566 PUBSUB_EMULATOR_HOST=localhost:8085 cargo test --test trigger_e2e --features kafka,nats,sqs_trigger,gcp_trigger,enterprise,private -- --ignored --nocapture"
echo " AWS_ENDPOINT_URL=http://localhost:4566 PUBSUB_EMULATOR_HOST=localhost:8085 cargo test -p windmill-api-integration-tests --test trigger_e2e --features kafka,nats,sqs_trigger,gcp_trigger,enterprise,private -- --ignored --nocapture"
echo ""
echo " # SQS is not #[ignore]d, so --ignored would skip it"
echo " AWS_ENDPOINT_URL=http://localhost:4566 cargo test -p windmill-api-integration-tests --test trigger_e2e test_sqs_e2e --features sqs_trigger,enterprise,private -- --nocapture"
fi
+3 -3
View File
@@ -23,7 +23,7 @@ docker rm -f "$NAME" 2>/dev/null || true
docker run -d --name "$NAME" -p "${PORT}:4566" \
-e SERVICES=sqs \
localstack/localstack
localstack/localstack:3.8
echo "Waiting for LocalStack to become ready..."
for i in $(seq 1 30); do
@@ -41,5 +41,5 @@ aws --endpoint-url="http://localhost:${PORT}" \
echo "LocalStack SQS listening on localhost:${PORT} with queue 'windmill-e2e-test'"
echo ""
echo "Run the test:"
echo " AWS_ENDPOINT_URL=http://localhost:${PORT} cargo test --test trigger_e2e test_sqs_e2e --features sqs_trigger,enterprise,private -- --ignored --nocapture"
echo "Run the test (it is not #[ignore]d, so do not pass --ignored):"
echo " AWS_ENDPOINT_URL=http://localhost:${PORT} cargo test -p windmill-api-integration-tests --test trigger_e2e test_sqs_e2e --features sqs_trigger,enterprise,private -- --nocapture"
@@ -1,10 +1,18 @@
/*!
* End-to-end integration tests for Windmill trigger listeners.
*
* Most tests are `#[ignore]` because they need an external service (MQTT broker,
* NATS server, Kafka broker, ...) that nothing starts for them. `test_sqs_e2e` is
* the exception: CI runs a LocalStack service for it, so it is not ignored. See
* each test's doc comment for how to run it locally.
* Most tests are `#[ignore]` because they require a running external service
* (MQTT broker, NATS server, Kafka broker, etc.). `test_sqs_e2e` is the
* exception: CI starts LocalStack for it, so it runs unignored and must not be
* invoked with `--ignored`. See individual test doc comments for setup.
*
* Quick start — use the helper scripts in `tests/fixtures/` (paths relative to
* `backend/`):
* ```bash
* ./tests/fixtures/start_all_triggers.sh # start all services
* ./tests/fixtures/start_all_triggers.sh oss # start OSS services only
* ./tests/fixtures/start_all_triggers.sh stop # tear down everything
* ```
*
* The general pattern:
* 1. Insert a test script + trigger row + resource into the DB
@@ -704,14 +712,12 @@ async fn test_nats_e2e(db: Pool<Postgres>) -> anyhow::Result<()> {
/// End-to-end test for SQS trigger (Enterprise only).
///
/// CI provides LocalStack and the queue (see `backend-test.yml`). To run it locally:
/// Unlike the other tests here this one is not `#[ignore]`d: CI starts LocalStack
/// and creates the queue (see `backend-test.yml`). Locally, from `backend/`:
/// ```bash
/// docker run -d --rm -p 4566:4566 -e SERVICES=sqs localstack/localstack:3.8
/// aws --endpoint-url http://localhost:4566 --region us-east-1 \
/// sqs create-queue --queue-name windmill-e2e-test
/// AWS_ENDPOINT_URL=http://localhost:4566 AWS_ACCESS_KEY_ID=test \
/// AWS_SECRET_ACCESS_KEY=test AWS_REGION=us-east-1 \
/// cargo test --test trigger_e2e test_sqs_e2e \
/// ./tests/fixtures/start_sqs.sh
/// AWS_ENDPOINT_URL=http://localhost:4566 \
/// cargo test -p windmill-api-integration-tests --test trigger_e2e test_sqs_e2e \
/// --features sqs_trigger,enterprise,private -- --nocapture
/// ```
// `sqs_trigger` is what makes run_server spawn the SQS listener; the aws-sdk-sqs dev