gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] 01/02: adjust tests


From: gnunet
Subject: [taler-exchange] 01/02: adjust tests
Date: Sun, 19 Jan 2020 02:28:20 +0100

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

grothoff pushed a commit to branch master
in repository exchange.

commit 021a2003d59282e6508618f34e80c0ac61774624
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Jan 19 00:14:54 2020 +0100

    adjust tests
---
 src/auditor/test-auditor.sh | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 1b3755c2..ea3f1373 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -644,7 +644,7 @@ function test_9() {
 echo "===========9: wire-origin disagreement==========="
 OLD_ID=`echo "SELECT id FROM app_banktransaction WHERE amount='TESTKUDOS:10' 
ORDER BY id LIMIT 1;" | psql $DB -Aqt`
 OLD_ACC=`echo "SELECT debit_account_id FROM app_banktransaction WHERE 
id='$OLD_ID';" | psql $DB -Aqt`
-echo "UPDATE app_banktransaction SET debit_account_id=1;" | psql -Aqt $DB
+echo "UPDATE app_banktransaction SET debit_account_id=1 WHERE id='$OLD_ID';" | 
psql -Aqt $DB
 
 run_audit
 
@@ -662,7 +662,7 @@ fi
 echo PASS
 
 # Undo database modification
-echo "UPDATE app_banktransaction SET debit_account_id=$OLD_ACC;" | psql -Aqt 
$DB
+echo "UPDATE app_banktransaction SET debit_account_id=$OLD_ACC WHERE 
id='$OLD_ID';" | psql -Aqt $DB
 
 }
 
@@ -759,13 +759,13 @@ echo -n "Testing hung refresh detection... "
 
 HANG=`jq -er .refresh_hanging[0].amount < test-audit.json`
 TOTAL_HANG=`jq -er .total_refresh_hanging < test-audit.json`
-if test x$HANG != x$TOTAL_HANG
+if test x$HANG = TESTKUDOS:0
 then
-    exit_fail "Hanging amount inconsistent, got $HANG and $TOTAL_HANG"
+    exit_fail "Hanging amount zero"
 fi
 if test x$TOTAL_HANG = TESTKUDOS:0
 then
-    exit_fail "Hanging amount zero"
+    exit_fail "Total hanging amount zero"
 fi
 
 echo PASS
@@ -1063,18 +1063,8 @@ jq -e .amount_arithmetic_inconsistencies[0] < 
test-audit.json > /dev/null || exi
 
 echo PASS
 
-echo -n "Testing risk/loss calculation... "
+echo -n "Testing loss calculation... "
 
-AMOUNT=`jq -r .emergencies_risk_by_amount < test-audit.json`
-if test "x$AMOUNT" == "xTESTKUDOS:0"
-then
-    exit_fail "Reported amount wrong: $AMOUNT"
-fi
-AMOUNT=`jq -r .emergencies_risk_by_count < test-audit.json`
-if test "x$AMOUNT" == "xTESTKUDOS:0"
-then
-    exit_fail "Reported amount wrong: $AMOUNT"
-fi
 AMOUNT=`jq -r .emergencies_loss < test-audit.json`
 if test "x$AMOUNT" == "xTESTKUDOS:0"
 then

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



reply via email to

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