-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-all-endpoints.sh
More file actions
executable file
Β·38 lines (29 loc) Β· 1.31 KB
/
test-all-endpoints.sh
File metadata and controls
executable file
Β·38 lines (29 loc) Β· 1.31 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
33
34
35
36
37
38
#!/bin/bash
echo "π§ͺ Testing 2025 Hybrid Ensemble Sleep Imputation Server"
echo "=========================================="
BASE_URL="http://localhost:8080/api/v1"
echo "π 1. Testing Health Check..."
curl -s "$BASE_URL/health" | jq '.' || echo "β Health check failed"
echo
echo "π 2. Testing Root Endpoint..."
curl -s "$BASE_URL/" | jq '.' || echo "β Root endpoint failed"
echo
echo "βοΈ 3. Testing Algorithm Configuration..."
curl -s "$BASE_URL/sleep/config" | jq '.' || echo "β Config endpoint failed"
echo
echo "β
4. Testing Sleep Data Validation..."
curl -X POST -H "Content-Type: application/json" \
-d @/Users/joshreed/Code/Slumber/test-validate-data.json \
"$BASE_URL/sleep/validate" | jq '.' || echo "β Validation endpoint failed"
echo
echo "π§ 5. Testing Sleep Stage Imputation..."
curl -X POST -H "Content-Type: application/json" \
-d @/Users/joshreed/Code/Slumber/test-sleep-data.json \
"$BASE_URL/sleep/impute" | jq '.' || echo "β Imputation endpoint failed"
echo
echo "π 6. Testing WebSocket Streaming Stats..."
curl -s "$BASE_URL/sleep/stream/stats" | jq '.' || echo "β WebSocket stats failed"
echo
echo "π All tests completed!"
echo "=========================================="
echo "π WebSocket test available at: file:///Users/joshreed/Code/Slumber/test-websocket.html"