-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick_test.sh
More file actions
executable file
·32 lines (28 loc) · 837 Bytes
/
quick_test.sh
File metadata and controls
executable file
·32 lines (28 loc) · 837 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
#!/bin/bash
BASE_URL="http://localhost:8080"
echo "🧪 Testing API Endpoints..."
# Health Check
echo "1. Health Check:"
curl -s -X GET $BASE_URL/health | jq 2>/dev/null || echo "Install jq for pretty JSON"
# Signup
echo -e "
2. Signup:"
SIGNUP_RESPONSE=$(curl -s -X POST $BASE_URL/auth/signup \
-H "Content-Type: application/json" \
-d '{
"email": "quicktest@example.com",
"password": "testpass123"
}')
echo $SIGNUP_RESPONSE | jq 2>/dev/null || echo $SIGNUP_RESPONSE
# Login
echo -e "
3. Login:"
LOGIN_RESPONSE=$(curl -s -X POST $BASE_URL/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "quicktest@example.com",
"password": "testpass123"
}')
echo $LOGIN_RESPONSE | jq 2>/dev/null || echo $LOGIN_RESPONSE
echo -e "
✅ Quick test complete! Check API_TESTING.md for full testing guide."