From 56e61c94319bfbd46a307e702c1f885f0567d5d9 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Thu, 6 Jul 2017 13:49:02 +0200 Subject: [PATCH] Cli tests abort cleaner when server can't start --- tests/cli/basictx.sh | 4 +++- tests/cli/counter.sh | 4 +++- tests/cli/ibc.sh | 8 ++++---- tests/cli/restart.sh | 4 +++- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/tests/cli/basictx.sh b/tests/cli/basictx.sh index 591b99d806..f3db1f2f6d 100755 --- a/tests/cli/basictx.sh +++ b/tests/cli/basictx.sh @@ -8,7 +8,9 @@ RICH=${ACCOUNTS[0]} POOR=${ACCOUNTS[4]} oneTimeSetUp() { - quickSetup .basecoin_test_basictx basictx-chain + if ! quickSetup .basecoin_test_basictx basictx-chain; then + exit 1; + fi } oneTimeTearDown() { diff --git a/tests/cli/counter.sh b/tests/cli/counter.sh index e4d7352f32..7a825454e6 100755 --- a/tests/cli/counter.sh +++ b/tests/cli/counter.sh @@ -8,7 +8,9 @@ RICH=${ACCOUNTS[0]} POOR=${ACCOUNTS[4]} oneTimeSetUp() { - quickSetup .basecoin_test_counter counter-chain + if ! quickSetup .basecoin_test_counter counter-chain; then + exit 1; + fi } oneTimeTearDown() { diff --git a/tests/cli/ibc.sh b/tests/cli/ibc.sh index 0ff92cadc4..aea38fba55 100755 --- a/tests/cli/ibc.sh +++ b/tests/cli/ibc.sh @@ -37,19 +37,19 @@ oneTimeSetUp() { # Start basecoin server, giving money to the key in the first client BC_HOME=${CLIENT_1} initServer $BASE_DIR_1 $CHAIN_ID_1 $PREFIX_1 - if [ $? != 0 ]; then return 1; fi + if [ $? != 0 ]; then exit 1; fi PID_SERVER_1=$PID_SERVER # Start second basecoin server, giving money to the key in the second client BC_HOME=${CLIENT_2} initServer $BASE_DIR_2 $CHAIN_ID_2 $PREFIX_2 - if [ $? != 0 ]; then return 1; fi + if [ $? != 0 ]; then exit 1; fi PID_SERVER_2=$PID_SERVER # Connect both clients BC_HOME=${CLIENT_1} initClient $CHAIN_ID_1 $PORT_1 - if [ $? != 0 ]; then return 1; fi + if [ $? != 0 ]; then exit 1; fi BC_HOME=${CLIENT_2} initClient $CHAIN_ID_2 $PORT_2 - if [ $? != 0 ]; then return 1; fi + if [ $? != 0 ]; then exit 1; fi printf "...Testing may begin!\n\n\n" } diff --git a/tests/cli/restart.sh b/tests/cli/restart.sh index 758eeddb6e..993db2eb77 100755 --- a/tests/cli/restart.sh +++ b/tests/cli/restart.sh @@ -8,7 +8,9 @@ RICH=${ACCOUNTS[0]} POOR=${ACCOUNTS[4]} oneTimeSetUp() { - quickSetup .basecoin_test_restart restart-chain + if ! quickSetup .basecoin_test_restart restart-chain; then + exit 1; + fi } oneTimeTearDown() {