Table of Contents

RobinNet Testing

This page explains how to test RobinNet locally.

The easiest approach is running two nodes on one machine.


Start Node A

ROBINNET_DB=./data/alpha.db \
ROBINNET_PORT=8081 \
python -m robinnet.main

Start Node B

ROBINNET_DB=./data/bravo.db \
ROBINNET_PORT=8082 \
python -m robinnet.main

Initialize Each Node

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 Peers

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.


Test Peer Connectivity

python -m robinnet.cli \
  --db ./data/alpha.db \
  peer-test \
  --peer-id 1

This command checks:


Create Test Messages

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

Manual Bulletin Test

Create a message:

python -m robinnet.cli \
  --db ./data/alpha.db \
  post-bulletin \
  --title "Test Message" \
  --body "Hello RobinNet"

Sync Nodes

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

Verify Message Replication

Check Node B:

python -m robinnet.cli \
  --db ./data/bravo.db \
  list-messages

You should see the messages created on Node A.


Inspect Message Trace

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.


Next Step

After testing the CLI and API, see:

RobinNet Start Page