diff options
author | Sonic <sonic@dexon.org> | 2019-04-05 10:45:05 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-15 22:09:55 +0800 |
commit | 9041a4c140f07e41ca35ee5fe09af5d54c1fa044 (patch) | |
tree | 2b4e9c9871f28c2ba656cab6df016d217cff4197 /build/recovery-test.sh | |
parent | 8bb384eb28d4aceba63b8077f664381fb3c06444 (diff) | |
download | go-tangerine-9041a4c140f07e41ca35ee5fe09af5d54c1fa044.tar go-tangerine-9041a4c140f07e41ca35ee5fe09af5d54c1fa044.tar.gz go-tangerine-9041a4c140f07e41ca35ee5fe09af5d54c1fa044.tar.bz2 go-tangerine-9041a4c140f07e41ca35ee5fe09af5d54c1fa044.tar.lz go-tangerine-9041a4c140f07e41ca35ee5fe09af5d54c1fa044.tar.xz go-tangerine-9041a4c140f07e41ca35ee5fe09af5d54c1fa044.tar.zst go-tangerine-9041a4c140f07e41ca35ee5fe09af5d54c1fa044.zip |
build: add end to end integration test for recovery mechanism (#336)
Diffstat (limited to 'build/recovery-test.sh')
-rwxr-xr-x | build/recovery-test.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/build/recovery-test.sh b/build/recovery-test.sh new file mode 100755 index 000000000..f305f743c --- /dev/null +++ b/build/recovery-test.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +tarAndUpload() +{ + name=travis-fail-$(date +%s).tar.gz + tar -zcvf $name test + echo "Verify fail and upload $name" + PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig go run build/testtool/testtool.go upload $name dexon-builds +} + +endpoint=http://127.0.0.1:8545 + +timeout=700 + +echo "Wait for recovery" +cmd="PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig go run build/testtool/testtool.go waitForRecovery $endpoint $timeout" +eval $cmd +code=$? +if [ $code == 1 ]; then + tarAndUpload + exit 1 +fi |