robinnet:testing
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| robinnet:testing [2026/03/11 15:23] – created freedomotter | robinnet:testing [2026/03/11 15:51] (current) – [Next Step] freedomotter | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== RobinNet Testing | + | ====== RobinNet Testing ====== |
| - | Testing | + | This page explains how to test RobinNet locally. |
| + | |||
| + | The easiest | ||
| ----- | ----- | ||
| Line 25: | Line 27: | ||
| ----- | ----- | ||
| - | ===== Add Peer ===== | + | ===== Initialize Each Node ===== |
| - | From node A: | + | Node A: |
| + | |||
| + | <code bash> | ||
| + | python -m robinnet.cli \ | ||
| + | --db ./ | ||
| + | init-node \ | ||
| + | --name alpha \ | ||
| + | --operator " | ||
| + | </ | ||
| + | |||
| + | Node B: | ||
| + | |||
| + | <code bash> | ||
| + | python -m robinnet.cli \ | ||
| + | --db ./ | ||
| + | init-node \ | ||
| + | --name bravo \ | ||
| + | --operator " | ||
| + | </ | ||
| + | |||
| + | ----- | ||
| + | |||
| + | ===== Add Peers ===== | ||
| + | |||
| + | Add Node B as a peer of Node A: | ||
| <code bash> | <code bash> | ||
| Line 36: | Line 62: | ||
| --url http:// | --url http:// | ||
| </ | </ | ||
| + | |||
| + | You can also add Node A to Node B. | ||
| ----- | ----- | ||
| - | ===== Post Bulletin ===== | + | ===== Test Peer Connectivity ===== |
| + | |||
| + | <code bash> | ||
| + | python -m robinnet.cli \ | ||
| + | --db ./ | ||
| + | peer-test \ | ||
| + | --peer-id 1 | ||
| + | </ | ||
| + | |||
| + | This command checks: | ||
| + | |||
| + | * API connectivity | ||
| + | * remote node identity | ||
| + | * health endpoint | ||
| + | |||
| + | ----- | ||
| + | |||
| + | ===== Create Test Messages ===== | ||
| + | |||
| + | Generate test bulletins: | ||
| + | |||
| + | <code bash> | ||
| + | python -m robinnet.cli \ | ||
| + | --db ./ | ||
| + | generate-test-data \ | ||
| + | --count 5 | ||
| + | </ | ||
| + | |||
| + | List messages: | ||
| + | |||
| + | <code bash> | ||
| + | python -m robinnet.cli \ | ||
| + | --db ./ | ||
| + | list-messages | ||
| + | </ | ||
| + | |||
| + | ----- | ||
| + | |||
| + | ===== Manual | ||
| + | |||
| + | Create a message: | ||
| <code bash> | <code bash> | ||
| Line 52: | Line 120: | ||
| ===== Sync Nodes ===== | ===== Sync Nodes ===== | ||
| + | |||
| + | Pull and push messages: | ||
| <code bash> | <code bash> | ||
| python -m robinnet.cli \ | python -m robinnet.cli \ | ||
| - | --db ./data/bravo.db \ | + | --db ./data/alpha.db \ |
| + | sync-all | ||
| + | </ | ||
| + | |||
| + | You can also sync a single peer: | ||
| + | |||
| + | <code bash> | ||
| + | python -m robinnet.cli \ | ||
| + | --db ./ | ||
| sync-peer \ | sync-peer \ | ||
| --peer-id 1 | --peer-id 1 | ||
| Line 62: | Line 140: | ||
| ----- | ----- | ||
| - | ===== Verify Replication ===== | + | ===== Verify |
| + | |||
| + | Check Node B: | ||
| <code bash> | <code bash> | ||
| Line 70: | Line 150: | ||
| </ | </ | ||
| - | You should see the message | + | You should see the messages |
| + | |||
| + | ----- | ||
| + | |||
| + | ===== Inspect Message Trace ===== | ||
| + | |||
| + | Trace the path of a message: | ||
| + | |||
| + | <code bash> | ||
| + | python -m robinnet.cli \ | ||
| + | --db ./ | ||
| + | show-trace \ | ||
| + | --msg-uuid < | ||
| + | </ | ||
| + | |||
| + | This displays the message propagation history. | ||
| + | |||
| + | ----- | ||
| + | |||
| + | ===== Next Step ===== | ||
| + | |||
| + | After testing the CLI and API, see: | ||
| + | |||
| + | [[robin_net: | ||
robinnet/testing.1773242627.txt.gz · Last modified: by freedomotter
