-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtest-endpoints.sh
More file actions
executable file
·41 lines (34 loc) · 887 Bytes
/
test-endpoints.sh
File metadata and controls
executable file
·41 lines (34 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
BASE_URL="${1:-http://localhost:5146}"
echo "🎉 Testing WebSample endpoints..."
echo "Base URL: $BASE_URL"
echo ""
echo "1. 📅 Scheduling party (3 days from now)..."
if curl -sf "$BASE_URL/schedule-party" | jq . ; then
echo "✅ Success"
else
echo "❌ Failed"
fi
echo ""
echo "2. 📧 Sending birthday invite (will fail, 8h TTL)..."
if curl -sf "$BASE_URL/send-birthday-invite" | jq . ; then
echo "✅ Success"
else
echo "❌ Failed"
fi
echo ""
echo "3. 🍹 Ordering drinks (under 18, will go to dead-letter)..."
if curl -sf "$BASE_URL/order-drinks" | jq . ; then
echo "✅ Success"
else
echo "❌ Failed"
fi
echo ""
echo "4. 🌤️ Starting weather check job (every 3 minutes)..."
if curl -sf "$BASE_URL/start-weather-check" | jq . ; then
echo "✅ Success"
else
echo "❌ Failed"
fi
echo ""
echo "✅ All endpoints triggered!"