aboutsummaryrefslogtreecommitdiff
path: root/src/auditor/test-auditor.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditor/test-auditor.sh')
-rwxr-xr-xsrc/auditor/test-auditor.sh28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 0a79385f5..5124999ed 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -43,7 +43,7 @@ function exit_fail() {
43function run_audit () { 43function run_audit () {
44 # Launch bank 44 # Launch bank
45 echo -n "Launching bank " 45 echo -n "Launching bank "
46 taler-bank-manage -c test-auditor.conf serve-http 2>bank.err >bank.log & 46 taler-bank-manage -c $CONF serve-http 2>bank.err >bank.log &
47 while true 47 while true
48 do 48 do
49 echo -n "." 49 echo -n "."
@@ -55,15 +55,15 @@ function run_audit () {
55 if test ${1:-no} = "aggregator" 55 if test ${1:-no} = "aggregator"
56 then 56 then
57 echo -n "Running exchange aggregator ..." 57 echo -n "Running exchange aggregator ..."
58 taler-exchange-aggregator -t -c test-auditor.conf 58 taler-exchange-aggregator -t -c $CONF 2> aggregator.log
59 echo " DONE" 59 echo " DONE"
60 fi 60 fi
61 61
62 # Run the auditor! 62 # Run the auditor!
63 echo -n "Running audit(s) ..." 63 echo -n "Running audit(s) ..."
64 taler-auditor -r -c test-auditor.conf -m $MASTER_PUB > test-audit.json 2> test-audit.log || exit_fail "auditor failed" 64 taler-auditor -r -c $CONF -m $MASTER_PUB > test-audit.json 2> test-audit.log || exit_fail "auditor failed"
65 65
66 taler-wire-auditor -r -c test-auditor.conf -m $MASTER_PUB > test-wire-audit.json 2> test-wire-audit.log || exit_fail "wire auditor failed" 66 taler-wire-auditor -r -c $CONF -m $MASTER_PUB > test-wire-audit.json 2> test-wire-audit.log || exit_fail "wire auditor failed"
67 echo " DONE" 67 echo " DONE"
68 68
69 kill `jobs -p` || true 69 kill `jobs -p` || true
@@ -83,7 +83,7 @@ full_reload()
83 dropdb $DB 2> /dev/null || true 83 dropdb $DB 2> /dev/null || true
84 createdb -T template0 $DB || exit_skip "could not create database" 84 createdb -T template0 $DB || exit_skip "could not create database"
85 # Import pre-generated database, -q(ietly) using single (-1) transaction 85 # Import pre-generated database, -q(ietly) using single (-1) transaction
86 psql -Aqt $DB -q -1 -f ../benchmark/auditor-basedb.sql > /dev/null 86 psql -Aqt $DB -q -1 -f ${BASEDB}.sql > /dev/null
87} 87}
88 88
89 89
@@ -726,9 +726,20 @@ echo "DONE"
726 726
727# *************** Main logic starts here ************** 727# *************** Main logic starts here **************
728 728
729# Setup globals 729# ####### Setup globals ######
730# Postgres database to use
730DB=taler-auditor-test 731DB=taler-auditor-test
731MASTER_PUB=`cat ../benchmark/auditor-basedb.mpub` 732# Prefix for the data resources to use
733BASEDB="../benchmark/auditor-basedb"
734MASTER_PUB=`cat ${BASEDB}.mpub`
735# Configuration file to use
736CONF=test-auditor.conf
737
738# Where to store wire fee details for aggregator
739WIRE_FEE_DIR=`taler-config -c $CONF -f -s exchangedb -o WIREFEE_BASE_DIR`
740mkdir -p $WIRE_FEE_DIR
741cp ${BASEDB}.fees $WIRE_FEE_DIR/x-taler-bank.fee
742
732 743
733# test required commands exist 744# test required commands exist
734echo "Testing for jq" 745echo "Testing for jq"
@@ -754,8 +765,9 @@ do
754done 765done
755 766
756 767
757echo "Cleanup" 768echo "Cleanup (disabled)"
758# dropdb $DB 769# dropdb $DB
770# rm -r $WIRE_FEE_DIR
759# rm -f test-audit.log test-wire-audit.log 771# rm -f test-audit.log test-wire-audit.log
760 772
761exit $fail 773exit $fail