From 18d84349c8714f1d922fd49989ab2736267f7375 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 20 Jun 2022 23:20:15 -0600 Subject: [PATCH] test: script to test full workflow --- test.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 test.sh diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..4688d1b --- /dev/null +++ b/test.sh @@ -0,0 +1,28 @@ +#!/bin/bash +set -e +set -u + +if [[ ! -e 'source-key.wif' ]]; then + echo "Please run 'crowdnode generate ./source-key.wif' and load it with Đ0.01 to start" + exit 1 +fi + +./bin/crowdnode.js generate ./staking-key.wif +( + set -e + set -u + sleep 0.5 + ./bin/crowdnode.js transfer source-key.wif ./staking-key.wif 0.00256000 +) & +./bin/crowdnode.js signup ./staking-key.wif +./bin/crowdnode.js accept ./staking-key.wif +( + set -e + set -u + sleep 0.5 + ./bin/crowdnode.js transfer source-key.wif ./staking-key.wif +) & +./bin/crowdnode.js deposit ./staking-key.wif +./bin/crowdnode.js withdrawal ./staking-key.wif 100.0 +./bin/crowdnode.js balance ./staking-key.wif +./bin/crowdnode.js transfer ./staking-key.wif ./source-key.wif -- 2.25.1