B3: attach to the local regtest node and Fulcrum; smoke tests, helper script and fixtures

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Sonnet 5.5 committed 2026-11-16 15:43:44 +01:00
1 parent 9c832fd3d2
commit 0092596b07
9 files changed
+273 -6

No files matched your search

+13
View File
@@ -23,6 +23,19 @@ docker compose up -d --build
5. Verifica a mano su telefono e desktop: [checklist-verifica-sito.md](checklist-verifica-sito.md). Test automatici: `python -m pytest`.
6. Spegnere: `docker compose down` (i dati restano in `data/db`).
### Regtest per i test di integrazione (da B3)
Nodo e Fulcrum in regtest stanno nella cartella `plm-regtest` accanto al repository (`docker compose up -d` lì); il sito non li avvia. I test sotto `tests/integration/` si agganciano a loro e **si saltano** se non rispondono. Per default cercano l'RPC su `http://127.0.0.1:18332` (credenziali da `plm-regtest/node/palladium.conf`) e Fulcrum su `127.0.0.1:50001`; si cambiano con `PLM_REGTEST_RPC_URL`, `PLM_REGTEST_RPC_USER`, `PLM_REGTEST_RPC_PASSWORD`, `PLM_REGTEST_CONF` e `PLM_REGTEST_ELECTRUM`.
```bash
python scripts/regtest.py status # catena, altezza, saldo del portafoglio del nodo, Fulcrum
python scripts/regtest.py mine 10 # mina 10 blocchi
python scripts/regtest.py fund rplm1… 5 # manda 5 PLM a un indirizzo e mina un blocco
python -m pytest tests/integration # i test sulla catena vera
```
Lo script e i test rifiutano di agire su una catena che non sia regtest.
---
> **Nota (migrazione a Django).** Il resto di questa guida descrive il vecchio stack FastAPI, non più nel `docker-compose.yml`.