From 0d5a3d7b6f4d60997eccee7463c81844366a1506 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 8 Oct 2019 18:49:25 +0200 Subject: more comprehensive test-auditor.sh, including generate-auditor-basedb now --- src/auditor/generate-auditor-basedb.sh | 40 ++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 7 deletions(-) (limited to 'src/auditor/generate-auditor-basedb.sh') diff --git a/src/auditor/generate-auditor-basedb.sh b/src/auditor/generate-auditor-basedb.sh index 2654ffedc..0fe205707 100755 --- a/src/auditor/generate-auditor-basedb.sh +++ b/src/auditor/generate-auditor-basedb.sh @@ -41,7 +41,7 @@ cp generate-auditor-basedb-template.conf $CONF echo -n "Testing for taler-bank-manage" taler-bank-manage -h >/dev/null /dev/null taler-exchange-httpd.log & taler-merchant-httpd -c $CONF 2> taler-merchant-httpd.log & taler-exchange-wirewatch -c $CONF 2> taler-exchange-wirewatch.log & - - -# FIXME: also launch taler-auditor-httpd! - -# FIXME: interactive test here instead of waiting! -sleep 10 +taler-auditor-httpd -c $CONF 2> taler-auditor-httpd.log & + +# Wait for all services to be available +for n in `seq 1 20` +do + echo -n "." + sleep 0.1 + OK=0 + # exchange + wget http://localhost:8081/ -o /dev/null -O /dev/null >/dev/null || continue + # merchant + wget http://localhost:9966/ -o /dev/null -O /dev/null >/dev/null || continue + # bank + wget http://localhost:8082/ -o /dev/null -O /dev/null >/dev/null || continue + # Auditor + wget http://localhost:8083/ -o /dev/null -O /dev/null >/dev/null || continue + OK=1 + break +done + +if [ 1 != $OK ] +then + kill `jobs -p` + exit_skip "Failed to launch services" +fi +echo " DONE" # run wallet CLI echo "Running wallet" @@ -123,3 +143,9 @@ dropdb $TARGET_DB rm -f e2a.dat a2e.dat rm -rf $DATA_DIR || true rm $CONF + +echo "=====================================" +echo " Finished generation of $BASEDB" +echo "=====================================" + +exit 0 -- cgit v1.2.3