gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-exchange] 06/06: fix testcase, enable new testcases


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] 06/06: fix testcase, enable new testcases
Date: Sun, 06 Oct 2019 12:33:01 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

commit 97075502e0ffcceca2f19be576009b51cffcac5c
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Oct 6 12:32:49 2019 +0200

    fix testcase, enable new testcases
---
 src/auditor/test-auditor.sh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index aa8bcb0f..93047d8b 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
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]