description |
---|
A tool to allow for black-box testing of the node by creating a network in the comfort of your local environment |
Test harness is here to allow automating general-purposes and complex E2E dusk-network testing.
A common structure of such test is:
- Define configuration for each network node
- Bootstrap a network of N nodes, all properly configured
- Perform change-state actions (e.g send transaction, send wire message etc ...)
- Start monitoring utilities
- Perform checks to ensure proper state/result has been achieved
engine.*Cmd
- a set of gRPC calls to node gRPC serverengine.PublishTopicCmd
- a gRPC call to inject a message into the eventBus (pending)engine.SendWireMsg
- send a message to P2P layer
engine.SendQuery
- send graphql query to a specified node to fetch node data
Local network workspace
- a temporary folder that hosts all nodes directories during the test execution
ls /tmp/localnet-429879163
node-9000 node-9001 node-9002 node-9003
Node directory
- a temporary folder that hosts all data relevant to the running node
$ ls /tmp/localnet-429879163/node-9001/
chain dusk7001.log dusk-grpc.sock dusk.toml pipe-channel walletDB
Considering that you have previously cloned and built dusk-blindbidproof
, dusk-seeder
in the root directory as dusk-blockchain
, configure your env vars like this:
DUSK_HOME=/opt/gocode/src/github.com/dusk-network
DUSK_BLINDBID=$DUSK_HOME/dusk-blindbidproof/target/debug/blindbid
DUSK_BLOCKCHAIN=$DUSK_HOME/dusk-blockchain/bin/dusk
DUSK_SEEDER=$DUSK_HOME/dusk-seeder/voucher
DUSK_WALLET_PASS="default"
tests$ go test -v --count=1 --test.timeout=0 ./... -args -enable
Alternatively, you can have a one liner do it all (run it from dusk-blockchain root dir): DUSK_BLOCKCHAIN=$PWD/bin/dusk DUSK_BLINDBID=$PWD/../dusk-blindbidproof/target/debug/blindbid DUSK_SEEDER=$PWD/../dusk-seeder/voucher DUSK_WALLET_PASS="default" make test-harness