aboutsummaryrefslogtreecommitdiffstats
path: root/build/recovery-test.sh
diff options
context:
space:
mode:
authorSonic <sonic@dexon.org>2019-04-05 10:45:05 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-15 22:09:55 +0800
commit9041a4c140f07e41ca35ee5fe09af5d54c1fa044 (patch)
tree2b4e9c9871f28c2ba656cab6df016d217cff4197 /build/recovery-test.sh
parent8bb384eb28d4aceba63b8077f664381fb3c06444 (diff)
downloadgo-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-xbuild/recovery-test.sh22
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