gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated (7b1d8024 -> 956f6dca)


From: gnunet
Subject: [taler-exchange] branch master updated (7b1d8024 -> 956f6dca)
Date: Sat, 26 Oct 2019 22:36:59 +0200

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

grothoff pushed a change to branch master
in repository exchange.

    from 7b1d8024 modify auditor generator to properly create deposit 
confirmations
     new c308e89e add test to check deposit inconsistency detection logic
     new 956f6dca disable failing test

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 contrib/auditor-report.tex.j2 |  2 +-
 src/auditor/test-auditor.sh   | 46 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/contrib/auditor-report.tex.j2 b/contrib/auditor-report.tex.j2
index 29901c17..2830a6bc 100644
--- a/contrib/auditor-report.tex.j2
+++ b/contrib/auditor-report.tex.j2
@@ -224,7 +224,7 @@ The total amount the exchange currently lags behind is
 Note that some lag is perfectly normal.
 Below, we report {\em all} deposit confirmations that are lagging behind.
 
-% Table generation tested by testcase #XX in test-auditor.sh
+% Table generation tested by testcase #25 in test-auditor.sh
 
 {% if data.deposit_confirmation_inconsistencies|length() == 0 %}
   {\bf No deposit confirmations that are lagging behind detected.}
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 2020ce64..c7373fd0 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -138,6 +138,7 @@ echo "Checking output"
 # if an emergency was detected, that is a bug and we should fail
 echo -n "Test for emergencies... "
 jq -e .emergencies[0] < test-audit.json > /dev/null && exit_fail "Unexpected 
emergency detected in ordinary run" || echo PASS
+jq -e .deposit_confirmation_inconsistencies[0] < test-audit.json > /dev/null 
&& exit_fail "Unexpected deposit confirmation inconsistency detected" || echo 
PASS
 echo -n "Test for emergencies by count... "
 jq -e .emergencies_by_count[0] < test-audit.json > /dev/null && exit_fail 
"Unexpected emergency by count detected in ordinary run" || echo PASS
 
@@ -1406,6 +1407,48 @@ fi
 }
 
 
+
+# Test for missing deposits in exchange database.
+function test_25() {
+
+echo "===========25: deposits missing ==========="
+# Modify denom_sig, so it is wrong
+echo "DELETE FROM deposits;" | psql -Aqt $DB
+echo "DELETE FROM deposits WHERE deposit_serial_id=1;" | psql -Aqt $DB
+
+run_audit
+
+echo -n "Testing inconsistency detection... "
+
+jq -e .deposit_confirmation_inconsistencies[0] < test-audit.json > /dev/null 
|| exit_fail "Deposit confirmation inconsistency NOT detected"
+
+#OP=`jq -er .bad_sig_losses[0].operation < test-audit.json`
+#if test x$OP != xmelt
+#then
+#    exit_fail "Operation wrong, got $OP"
+#fi
+
+#LOSS=`jq -er .bad_sig_losses[0].loss < test-audit.json`
+#TOTAL_LOSS=`jq -er .total_bad_sig_loss < test-audit.json`
+#if test x$LOSS != x$TOTAL_LOSS
+#then
+#    exit_fail "Loss inconsistent, got $LOSS and $TOTAL_LOSS"
+#fi
+#if test x$TOTAL_LOSS = TESTKUDOS:0
+#then
+#    exit_fail "Loss zero"
+#fi
+
+echo PASS
+
+# cannot easily undo DELETE, hence full reload
+echo -n "Reloading database ..."
+full_reload
+echo "DONE"
+}
+
+
+
 # **************************************************
 # FIXME: Add more tests here! :-)
 # Specifically:
@@ -1463,6 +1506,9 @@ check_with_database()
 
 
 
+
+
+
 # *************** Main logic starts here **************
 
 # ####### Setup globals ######

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



reply via email to

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