#!/usr/bin/env bash # # Verification script for queue worker test setup # set -e echo "🔍 Queue Worker Test Setup Verification" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "" # Check if built if [ -f "dist/main.js" ]; then echo "✅ Service is built (dist/main.js exists)" else echo "❌ Service not built. Run: npm run build" exit 1 fi # Check if test script exists if [ -f "scripts/test-queue.ts" ]; then echo "✅ Test script exists (scripts/test-queue.ts)" else echo "❌ Test script not found" exit 1 fi # Check for tsx if command -v tsx &> /dev/null; then echo "✅ tsx is installed (found in PATH)" elif [ -f "node_modules/.bin/tsx" ]; then echo "✅ tsx is installed (found in node_modules)" else echo "❌ tsx not found. Run: pnpm install" exit 1 fi echo "" echo "📋 Test Queue Configuration:" echo " Queue name: test" echo " Owner: internal/health" echo " Endpoint: http://localhost:3080/internal/process-job" echo " Job types: test-job" echo "" echo "🚀 To run the full test:" echo "" echo " 1. Start Redis (if not running):" echo " redis-server --port 26388 --requirepass queue_dev_password" echo "" echo " 2. Start the queue worker:" echo " npm run start:dev" echo "" echo " 3. In another terminal, run the test:" echo " npm test" echo "" echo "✅ Setup verification complete!"