gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: old DBs only


From: gnunet
Subject: [taler-exchange] branch master updated: old DBs only
Date: Sun, 19 Jan 2020 14:27:52 +0100

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new fbc37509 old DBs only
fbc37509 is described below

commit fbc375092f3ac5be6125eda493f0f84d4962ba62
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Jan 19 14:27:49 2020 +0100

    old DBs only
---
 src/auditor/test-auditor.sh | 60 +++++++++++++++++++++++++++------------------
 1 file changed, 36 insertions(+), 24 deletions(-)

diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 06f1b370..0aea2778 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -1386,37 +1386,49 @@ full_reload
 function test_25() {
 
 echo "=========25: inconsistent coin history========="
-# Drop refund, so coin history is bogus.
-echo "DELETE FROM refunds WHERE refund_serial_id=1;" | psql -Aqt $DB
 
-run_audit aggregator
+# Check wire transfer lag reported (no aggregator!)
+# NOTE: This test is EXPECTED to fail for ~1h after
+# re-generating the test database as we do not
+# report lag of less than 1h (see GRACE_PERIOD in
+# taler-wire-auditor.c)
+if [ $DATABASE_AGE -gt 3600 ]
+then
 
-echo -n "Testing inconsistency detection... "
+    # Drop refund, so coin history is bogus.
+    echo "DELETE FROM refunds WHERE refund_serial_id=1;" | psql -Aqt $DB
 
-jq -e .coin_inconsistencies[0] < test-audit.json > /dev/null || exit_fail 
"Coin inconsistency NOT detected"
+    run_audit aggregator
 
-jq -e .row_inconsistencies[0] < test-audit.json > /dev/null || exit_fail "Coin 
history verification failure NOT reported"
+    echo -n "Testing inconsistency detection... "
 
-# Note: if the wallet withdrew much more than it spent, this might indeed
-# go legitimately unnoticed.
-jq -e .emergencies[0] < test-audit.json > /dev/null || exit_fail "Denomination 
value emergency NOT reported"
+    jq -e .coin_inconsistencies[0] < test-audit.json > /dev/null || exit_fail 
"Coin inconsistency NOT detected"
 
-AMOUNT=`jq -er .total_coin_delta_minus < test-audit.json`
-if test x$AMOUNT = xTESTKUDOS:0
-then
-    exit_fail "Expected non-zero total inconsistency amount from coins"
-fi
-# Note: if the wallet withdrew much more than it spent, this might indeed
-# go legitimately unnoticed.
-COUNT=`jq -er .emergencies_risk_by_amount < test-audit.json`
-if test x$AMOUNT = xTESTKUDOS:0
-then
-    exit_fail "Expected non-zero emergency-by-amount"
-fi
-echo PASS
+    jq -e .row_inconsistencies[0] < test-audit.json > /dev/null || exit_fail 
"Coin history verification failure NOT reported"
 
-# cannot easily undo DELETE, hence full reload
-full_reload
+    # Note: if the wallet withdrew much more than it spent, this might indeed
+    # go legitimately unnoticed.
+    jq -e .emergencies[0] < test-audit.json > /dev/null || exit_fail 
"Denomination value emergency NOT reported"
+
+    AMOUNT=`jq -er .total_coin_delta_minus < test-audit.json`
+    if test x$AMOUNT = xTESTKUDOS:0
+    then
+        exit_fail "Expected non-zero total inconsistency amount from coins"
+    fi
+    # Note: if the wallet withdrew much more than it spent, this might indeed
+    # go legitimately unnoticed.
+    COUNT=`jq -er .emergencies_risk_by_amount < test-audit.json`
+    if test x$AMOUNT = xTESTKUDOS:0
+    then
+        exit_fail "Expected non-zero emergency-by-amount"
+    fi
+    echo PASS
+
+    # cannot easily undo DELETE, hence full reload
+    full_reload
+else
+    echo "Test skipped (database too new)"
+fi
 }
 
 

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



reply via email to

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