Test Plan for RNode
Purpose of this Document
Networking Features
- The Node starts up in bootstrap node when configured to do so
- The node connects to peers when configured in networking mode
- The node starts up in standalone mode
Rholang CLI (Interpreter)
- Interpreter can be invoked via gRPC API
- Rholang Code can be evaluated in the Node regardless of the mode the node boots up in
- standalone mode
- Bootstrap mode
- Connected mode
- Rholang CLI can be invoked in 2 modes
- REPL
- Execute: @"listCh"!([1, 2, 3]) | for(@list <- @"listCh"){ match list { [a, b, c] => { @"stdout"!(a) } } }
- EVAL - accepts a file
- REPL
STDOUT channel works:
- @"stdout"!("foo") returns 'foo' to STDOUT Channel.
gRPC API (Node API)
- Server accepts requests and returns responses
- List of peers is accurate & matches what is presented on the server console.
- Response from peers reflects peers currently connected and changes as the peer list changes
- Deploy-demo call works (--deploy-demo)
Metrics
- Check Promethus server
- Check that all metrics in the release appear
Installation, Starting and Ending the program
- Installation completes without issues
- Ctrl-C terminates the program without throwing an exception
- Program starts without exceptions (providing that the directories needed exist on the system)
- In the event that the bootstrap node cannot be found, system provides a message an ends normally.
Debian Instructions
git clone https://github.com/rchain/rchain.git cd rchain git checkout dev sbt clean bnfc:generate node/debian:packageBin sudo apt install ./node/target/ sudo apt install ./node/target/rnode_0.3.1_all.deb sudo systemctl start rnode.service # in one terminal sudo journalctl -f -u rnode.service # in another terminal (for repl testing) rnode --repl # after that (for deploy testing) rnode --deploy-demo
Fedora Instructions
git clone https://github.com/rchain/rchain.git cd rchain git checkout dev sbt clean bnfc:generate node/rpm:packageBin sudo dnf install node/target/rpm/RPMS/noarch/rnode-0.3.1-1.noarch.rpm sudo systemctl start rnode.service # in one terminal sudo journalctl -f -u rnode.service # in another terminal (for repl testing) rnode --repl # after that (for deploy testing) rnode --deploy-demo
Clean-up scripts (need a bit of improvement, but should get you started):
https://gist.github.com/henrytill/ac72d8616e52d836efc3008bbd9f67dd
Run this at the REPL as many times as humanly possible:
@"stdout"!("foo")
Run this to evaluate rholange example files
Eval examples
for i in $(ls /usr/share/rnode/examples/*.rho); do echo $i; rnode --eval $i; done