quick end-to-end test
And some bug fixes too!
This commit is contained in:
52
e2e.sh
Executable file
52
e2e.sh
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
|
||||
BASE_URL="http://localhost:8080/api"
|
||||
|
||||
echo "=== E2E Pseudo Test ==="
|
||||
echo ""
|
||||
|
||||
echo "POST /api/orderupdate - Place SELL order"
|
||||
curl -s -X POST "$BASE_URL/orderupdate" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"delivery_start_time": "2024-01-15T10:00:00",
|
||||
"delivery_end_time": "2024-01-15T10:15:00",
|
||||
"order_side": "SELL",
|
||||
"quantity": 10,
|
||||
"price": 50.00
|
||||
}' | jq .
|
||||
echo ""
|
||||
|
||||
echo "POST /api/orderupdate - Place matching BUY order"
|
||||
curl -s -X POST "$BASE_URL/orderupdate" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"delivery_start_time": "2024-01-15T10:00:00",
|
||||
"delivery_end_time": "2024-01-15T10:15:00",
|
||||
"order_side": "BUY",
|
||||
"quantity": 5,
|
||||
"price": 50.00
|
||||
}' | jq .
|
||||
echo ""
|
||||
|
||||
echo "POST /api/orderupdate - Place another SELL order"
|
||||
curl -s -X POST "$BASE_URL/orderupdate" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"delivery_start_time": "2024-01-15T10:15:00",
|
||||
"delivery_end_time": "2024-01-15T10:30:00",
|
||||
"order_side": "SELL",
|
||||
"quantity": 20,
|
||||
"price": 45.00
|
||||
}' | jq .
|
||||
echo ""
|
||||
|
||||
echo "GET /api/market/overview - Get market overview"
|
||||
curl -s -X GET "$BASE_URL/market/overview" | jq .
|
||||
echo ""
|
||||
|
||||
echo "GET /api/purchases/average - Get average purchase price"
|
||||
curl -s -X GET "$BASE_URL/purchases/average" | jq .
|
||||
echo ""
|
||||
|
||||
echo "=== Done ==="
|
||||
Reference in New Issue
Block a user