This page explains how to test RobinNet locally.
The easiest approach is running two nodes on one machine.
ROBINNET_DB=./data/alpha.db \ ROBINNET_PORT=8081 \ python -m robinnet.main
ROBINNET_DB=./data/bravo.db \ ROBINNET_PORT=8082 \ python -m robinnet.main
Node A:
python -m robinnet.cli \ --db ./data/alpha.db \ init-node \ --name alpha \ --operator "Rich"
Node B:
python -m robinnet.cli \ --db ./data/bravo.db \ init-node \ --name bravo \ --operator "Rich"
Add Node B as a peer of Node A:
python -m robinnet.cli \ --db ./data/alpha.db \ add-peer \ --name bravo \ --url http://127.0.0.1:8082
You can also add Node A to Node B.
python -m robinnet.cli \ --db ./data/alpha.db \ peer-test \ --peer-id 1
This command checks:
Generate test bulletins:
python -m robinnet.cli \ --db ./data/alpha.db \ generate-test-data \ --count 5
List messages:
python -m robinnet.cli \ --db ./data/alpha.db \ list-messages
Create a message:
python -m robinnet.cli \ --db ./data/alpha.db \ post-bulletin \ --title "Test Message" \ --body "Hello RobinNet"
Pull and push messages:
python -m robinnet.cli \ --db ./data/alpha.db \ sync-all
You can also sync a single peer:
python -m robinnet.cli \ --db ./data/alpha.db \ sync-peer \ --peer-id 1
Check Node B:
python -m robinnet.cli \ --db ./data/bravo.db \ list-messages
You should see the messages created on Node A.
Trace the path of a message:
python -m robinnet.cli \ --db ./data/alpha.db \ show-trace \ --msg-uuid <uuid>
This displays the message propagation history.
After testing the CLI and API, see: