github.com/Tri-stone/burrow@v0.25.0/vent/test/test.sh (about) 1 #!/bin/bash 2 3 # This script provides a simple running test chain that will generate height notification events 4 # Run postgres in background with: docker run -p 5432:5432 postgres 5 6 vent_test_dir="$GOPATH/src/github.com/hyperledger/burrow/vent/test" 7 [[ ! -f burrow.toml ]] && burrow spec -f1 | burrow configure -s- > burrow.toml && rm -rf .burrow 8 burrow start -v0 &> burrow.log & 9 sleep 2s 10 burrow vent start --db-block --abi "$vent_test_dir/EventsTest.abi" --spec "$vent_test_dir/sqlsol_example.json" 11 # Now: 12 # psql -h 127.0.0.1 -p 5432 -U postgres 13 # LISTEN height; 14 # -- run any command to see notifications: 15 # SELECT true; 16 # -- run it some more 17 18 # Generate some other events (on channels meta and keyed_meta) with: 19 # addr=$(curl -s localhost:26658/validators | jq -r '.result.BondedValidators[0].Address') 20 # burrow deploy -a $addr 21 22 trap "killall burrow" EXIT