-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_integration.sh
More file actions
executable file
·29 lines (24 loc) · 1010 Bytes
/
test_integration.sh
File metadata and controls
executable file
·29 lines (24 loc) · 1010 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
#!/bin/bash
echo "🧪 Testing Frontend-Backend Integration"
echo "======================================"
# Test CORS preflight request
echo "1. Testing CORS preflight request..."
curl -X OPTIONS "http://localhost:8000/search-rag" \
-H "Origin: http://localhost:8081" \
-H "Access-Control-Request-Method: POST" \
-H "Access-Control-Request-Headers: Content-Type" \
-v 2>&1 | grep -E "(access-control|HTTP/1.1)"
echo ""
echo "2. Testing actual search request..."
curl -X POST "http://localhost:8000/search-rag" \
-H "Content-Type: application/json" \
-H "Origin: http://localhost:8081" \
-d '{"query": "microgravity effects on mice", "top_k": 3}' \
-s | jq '.answer' 2>/dev/null || echo "Response received (jq not available)"
echo ""
echo "3. Testing graph endpoint..."
curl -X GET "http://localhost:8000/graph" \
-H "Origin: http://localhost:8081" \
-s | jq '.nodes | length' 2>/dev/null || echo "Graph data received (jq not available)"
echo ""
echo "✅ Integration test completed!"