2272d5520b
tests/smoke/run_unified.sh exercises the common interface against a live server + real upstreams (Deribit/Hyperliquid public endpoints): get_instruments (single + fan-out, asserting fees/history_start), get_historical for both venues, and a 422 for an unsupported exchange. Refresh tests/smoke/README.md (drop stale Bybit/Alpaca references). Verified green end-to-end. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1.2 KiB
1.2 KiB
Smoke locale Cerbero_mcp
# da repo root, con il server attivo (docker compose up -d)
PORT=9000 TESTNET_TOKEN="$TESTNET_TOKEN" bash tests/smoke/run.sh
MAINNET_TOKEN="$MAINNET_TOKEN" bash tests/smoke/run_unified.sh
run.sh — endpoint pubblici + un tool per-exchange
Verifica /health, /apidocs, /openapi.json (schema bearer) e, se
TESTNET_TOKEN è settato, che un tool senza bearer dia 401 e con bearer
testnet venga instradato (deribit get_ticker BTC-PERPETUAL).
run_unified.sh — interfaccia comune /mcp (upstream reali)
Verifica end-to-end contro Deribit/Hyperliquid (endpoint pubblici):
get_instruments exchange=deribit→feesehistory_startpopolati liveget_instrumentsfan-out → contribuiscono sia deribit sia hyperliquidget_historicalderibit + hyperliquid → candele non vuote, schema uniformeget_historical exchange=bybit→422(rifiutato a livello schema)
Variabili di ambiente:
PORT(default9000) oGATEWAY(URL base, defaulthttp://localhost:PORT)MAINNET_TOKEN/TESTNET_TOKEN— bearer (uno dei due basta; mainnet per dati reali)BOT_TAG(defaultsmoke) — headerX-Bot-Tag
Exit code 0 = tutto OK, 1 = uno o più check falliti, 0 con skip se nessun token.