aboutsummaryrefslogtreecommitdiff
path: root/src/auditor/test-auditor.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-06 12:32:49 +0200
committerChristian Grothoff <christian@grothoff.org>2019-10-06 12:32:49 +0200
commit97075502e0ffcceca2f19be576009b51cffcac5c (patch)
tree45994dc4235c51d68e5cfc49cacfc9481b550cb8 /src/auditor/test-auditor.sh
parent03439cac913177ba3868eec4cb4207aabbf38f93 (diff)
fix testcase, enable new testcases
Diffstat (limited to 'src/auditor/test-auditor.sh')
-rwxr-xr-xsrc/auditor/test-auditor.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index aa8bcb0f1..93047d8b2 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -9,7 +9,7 @@ set -eu
# Set of numbers for all the testcases.
# When adding new tests, increase the last number:
-ALL_TESTS=`seq 0 17`
+ALL_TESTS=`seq 0 21`
# $TESTS determines which tests we should run.
# This construction is used to make it easy to
@@ -59,7 +59,7 @@ function pre_audit () {
if test ${1:-no} = "aggregator"
then
echo -n "Running exchange aggregator ..."
- taler-exchange-aggregator -t -c $CONF 2> aggregator.log
+ taler-exchange-aggregator -L INFO -t -c $CONF 2> aggregator.log
echo " DONE"
fi
}
@@ -1088,10 +1088,13 @@ echo "===========20: reserve closure done properly ================="
OLD_TIME=`echo "SELECT execution_date FROM reserves_in WHERE reserve_in_serial_id=1;" | psql $DB -Aqt`
OLD_VAL=`echo "SELECT credit_val FROM reserves_in WHERE reserve_in_serial_id=1;" | psql $DB -Aqt`
RES_PUB=`echo "SELECT reserve_pub FROM reserves_in WHERE reserve_in_serial_id=1;" | psql $DB -Aqt`
+OLD_EXP=`echo "SELECT expiration_date FROM reserves WHERE reserve_pub='${RES_PUB}';" | psql $DB -Aqt`
+VAL_DELTA=1
NEW_TIME=`expr $OLD_TIME - 3024000000000` # 5 weeks
-NEW_CREDIT=`expr $OLD_VAL + 100`
+NEW_EXP=`expr $OLD_EXP - 3024000000000` # 5 weeks
+NEW_CREDIT=`expr $OLD_VAL + $VAL_DELTA`
echo "UPDATE reserves_in SET execution_date='${NEW_TIME}',credit_val=${NEW_CREDIT} WHERE reserve_in_serial_id=1;" | psql -Aqt $DB
-echo "UPDATE reserves SET current_balance_val=100+current_balance_val WHERE reserve_pub='${RES_PUB}';" | psql -Aqt $DB
+echo "UPDATE reserves SET current_balance_val=${VAL_DELTA}+current_balance_val,expiration_date='${NEW_EXP}' WHERE reserve_pub='${RES_PUB}';" | psql -Aqt $DB
# Need to run with the aggregator so the reserve closure happens
run_audit aggregator
@@ -1104,6 +1107,7 @@ echo "PASS"
# Undo
echo "UPDATE reserves_in SET execution_date='${OLD_TIME}',credit_val=${OLD_VAL} WHERE reserve_in_serial_id=1;" | psql -Aqt $DB
+echo "UPDATE reserves SET expiration_date='${OLD_EXP}',current_balance_val=current_balance_val-${VAL_DELTA} WHERE reserve_pub='${RES_PUB}';" | psql -Aqt $DB
}