-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_script.sh
More file actions
executable file
·32 lines (29 loc) · 1.19 KB
/
test_script.sh
File metadata and controls
executable file
·32 lines (29 loc) · 1.19 KB
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
#!/bin/bash
# Test a catch-all domain (>1000 delivered, no bounces)
echo "Testing catch-all domain detection..."
for i in {1..1001}; do
curl -s -X PUT http://localhost:8081/events/catchall-test.com/delivered > /dev/null
if [ $((i % 100)) -eq 0 ]; then
echo "Sent $i delivered events"
fi
done
echo "Status for catchall-test.com:"
curl -s http://localhost:8081/domains/catchall-test.com | jq .
# Test non-catch-all domain (with bounces)
echo -e "\nTesting non-catch-all domain detection..."
for i in {1..500}; do
curl -s -X PUT http://localhost:8081/events/non-catchall-test.com/delivered > /dev/null
done
echo "Sent 500 delivered events"
curl -s -X PUT http://localhost:8081/events/non-catchall-test.com/bounced > /dev/null
echo "Sent 1 bounced event"
echo "Status for non-catchall-test.com:"
curl -s http://localhost:8081/domains/non-catchall-test.com | jq .
# Test unknown domain (<1000 delivered, no bounces)
echo -e "\nTesting unknown domain status..."
for i in {1..500}; do
curl -s -X PUT http://localhost:8081/events/unknown-test.com/delivered > /dev/null
done
echo "Sent 500 delivered events"
echo "Status for unknown-test.com:"
curl -s http://localhost:8081/domains/unknown-test.com | jq .