From 81fb5e8c298eb5c21f4fd7b2b394f8be7079d378 Mon Sep 17 00:00:00 2001 From: AdrianoDev Date: Mon, 27 Apr 2026 22:11:47 +0200 Subject: [PATCH] test(smoke): aggiunti live tool check read-only su 6 MCP --- tests/smoke/run.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/tests/smoke/run.sh b/tests/smoke/run.sh index 78a4f91..b386b9e 100755 --- a/tests/smoke/run.sh +++ b/tests/smoke/run.sh @@ -58,6 +58,51 @@ for ex in deribit bybit hyperliquid alpaca; do fi done +echo +echo "=== live tool check (read-only contro upstream testnet) ===" + +_check_tool() { + local label="$1" url="$2" body="$3" + local resp + resp=$(curl -s -X POST \ + -H "Authorization: Bearer $TOKEN" \ + -H "Content-Type: application/json" \ + -d "$body" \ + "$url" 2>/dev/null || echo '{}') + if echo "$resp" | jq -e 'has("error") | not' > /dev/null 2>&1 \ + && [ -n "$resp" ] && [ "$resp" != "null" ] && [ "$resp" != "{}" ]; then + echo " $label: OK" + else + echo " $label: FAIL" + echo " body: $(echo "$resp" | head -c 200)" + fail=$((fail + 1)) + fi +} + +_check_tool "deribit get_ticker BTC-PERPETUAL" \ + "$GATEWAY/mcp-deribit/tools/get_ticker" \ + '{"instrument_name":"BTC-PERPETUAL"}' + +_check_tool "bybit get_ticker BTCUSDT" \ + "$GATEWAY/mcp-bybit/tools/get_ticker" \ + '{"symbol":"BTCUSDT","category":"linear"}' + +_check_tool "hyperliquid get_ticker BTC" \ + "$GATEWAY/mcp-hyperliquid/tools/get_ticker" \ + '{"instrument":"BTC"}' + +_check_tool "alpaca get_clock (richiede ALPACA_PAPER credenziali valide)" \ + "$GATEWAY/mcp-alpaca/tools/get_clock" \ + '{}' + +_check_tool "macro get_treasury_yields" \ + "$GATEWAY/mcp-macro/tools/get_treasury_yields" \ + '{}' + +_check_tool "sentiment get_funding_rates BTC" \ + "$GATEWAY/mcp-sentiment/tools/get_funding_rates" \ + '{"asset":"BTC"}' + echo if [ "$fail" -gt 0 ]; then echo "SMOKE FAILED: $fail check(s) failed"