# Smoke locale Cerbero_mcp ```bash # 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` → `fees` e `history_start` popolati live - `get_instruments` fan-out → contribuiscono sia deribit sia hyperliquid - `get_historical` singolo (deribit, hyperliquid) → candele non vuote - `get_historical` consenso (senza `exchange`) → `sources_used` multipli + `div_pct` - `get_indicators` singolo + consenso → indicatori calcolati - `get_historical exchange=bybit` → `422` (rifiutato a livello schema) Variabili di ambiente: - `PORT` (default `9000`) o `GATEWAY` (URL base, default `http://localhost:PORT`) - `MAINNET_TOKEN` / `TESTNET_TOKEN` — bearer (uno dei due basta; mainnet per dati reali) - `BOT_TAG` (default `smoke`) — header `X-Bot-Tag` Exit code 0 = tutto OK, 1 = uno o più check falliti, 0 con skip se nessun token.