diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-08 18:49:25 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-08 18:49:25 +0200 |
commit | 0d5a3d7b6f4d60997eccee7463c81844366a1506 (patch) | |
tree | 3b51d3a29eefb6e86f82100791bf52da7f9bc94c /src/auditor/generate-auditor-basedb.sh | |
parent | bde4c742de41b38f5a741dc78fae9c105d0fff72 (diff) | |
download | exchange-0d5a3d7b6f4d60997eccee7463c81844366a1506.tar.xz |
more comprehensive test-auditor.sh, including generate-auditor-basedb now
Diffstat (limited to 'src/auditor/generate-auditor-basedb.sh')
-rwxr-xr-x | src/auditor/generate-auditor-basedb.sh | 40 |
1 files changed, 33 insertions, 7 deletions
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 || exit_skip " MISSING" echo " FOUND" -echo "Testing for taler-wallet-cli" +echo -n "Testing for taler-wallet-cli" taler-wallet-cli -h >/dev/null </dev/null || exit_skip " MISSING" echo " FOUND" @@ -94,12 +94,32 @@ taler-bank-manage -c $CONF serve-http & taler-exchange-httpd -c $CONF 2> 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 |