Add 7 #[ignore] e2e tests (one per trigger type) that fire real messages to external services and verify job creation in v2_job. Also add 9 DB-level CRUD tests for MQTT, GCP, and Email triggers. Includes helper shell scripts in tests/fixtures/ to start/stop each external service (MQTT, WebSocket, Postgres replication, Kafka, NATS, SQS via LocalStack, GCP Pub/Sub emulator). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
857 B
Bash
Executable File
32 lines
857 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Starts a WebSocket echo server for trigger_e2e::test_websocket_e2e
|
|
#
|
|
# Usage:
|
|
# ./tests/fixtures/start_websocket.sh # start
|
|
# ./tests/fixtures/start_websocket.sh stop # stop & remove
|
|
set -euo pipefail
|
|
|
|
NAME="windmill-test-ws-echo"
|
|
PORT=8765
|
|
|
|
if [[ "${1:-}" == "stop" ]]; then
|
|
docker rm -f "$NAME" 2>/dev/null && echo "stopped $NAME" || echo "$NAME not running"
|
|
exit 0
|
|
fi
|
|
|
|
if docker ps --format '{{.Names}}' | grep -q "^${NAME}$"; then
|
|
echo "$NAME is already running"
|
|
exit 0
|
|
fi
|
|
|
|
docker rm -f "$NAME" 2>/dev/null || true
|
|
|
|
docker run -d --name "$NAME" -p "${PORT}:8080" \
|
|
-e PORT=8080 \
|
|
jmalloc/echo-server
|
|
|
|
echo "WebSocket echo server listening on localhost:${PORT}"
|
|
echo ""
|
|
echo "Run the test:"
|
|
echo " cargo test --test trigger_e2e test_websocket_e2e --features websocket -- --ignored --nocapture"
|