[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: make auditor more robust to DB p
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: make auditor more robust to DB permutations |
Date: |
Tue, 24 Dec 2019 22:28:29 +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 0ec3301c make auditor more robust to DB permutations
0ec3301c is described below
commit 0ec3301cfb26e3d5f741389ab2f1f99068b6ed17
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Dec 24 22:28:27 2019 +0100
make auditor more robust to DB permutations
---
src/auditor/test-auditor.sh | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 1b6c7e6a..032f7d0e 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -390,8 +390,9 @@ function test_4() {
echo "===========4: deposit wire target wrong================="
# Original target bank account was 43, changing to 44
-OLD_WIRE=`echo 'SELECT wire FROM deposits WHERE deposit_serial_id=1;' | psql
$DB -Aqt`
-echo "UPDATE deposits SET
wire='{\"url\":\"payto://x-taler-bank/localhost:8082/44\",\"salt\":\"test-salt\"}'
WHERE deposit_serial_id=1" | psql -Aqt $DB
+SERIAL=`echo "SELECT deposit_serial_id FROM deposits WHERE
amount_with_fee_val=0 AND amount_with_fee_frac=10000000 ORDER BY
deposit_serial_id LIMIT 1" | psql $DB -Aqt`
+OLD_WIRE=`echo "SELECT wire FROM deposits WHERE deposit_serial_id=${SERIAL};"
| psql $DB -Aqt`
+echo "UPDATE deposits SET
wire='{\"url\":\"payto://x-taler-bank/localhost:8082/44\",\"salt\":\"test-salt\"}'
WHERE deposit_serial_id=${SERIAL}" | psql -Aqt $DB
run_audit
@@ -400,7 +401,7 @@ echo -n "Testing inconsistency detection... "
jq -e .bad_sig_losses[0] < test-audit.json > /dev/null || exit_fail "Bad
signature not detected"
ROW=`jq -e .bad_sig_losses[0].row < test-audit.json`
-if test $ROW != 1
+if test $ROW != ${SERIAL}
then
exit_fail "Row wrong, got $ROW"
fi
@@ -425,7 +426,7 @@ fi
echo PASS
# Undo:
-echo "UPDATE deposits SET wire='$OLD_WIRE' WHERE deposit_serial_id=1" | psql
-Aqt $DB
+echo "UPDATE deposits SET wire='$OLD_WIRE' WHERE deposit_serial_id=${SERIAL}"
| psql -Aqt $DB
}
@@ -441,6 +442,7 @@ echo "UPDATE deposits SET
h_contract_terms='\x12bb676444955c98789f219148aa31899d
run_audit
+echo -n "Checking bad signature detection... "
ROW=`jq -e .bad_sig_losses[0].row < test-audit.json`
if test $ROW != 1
then
@@ -464,6 +466,7 @@ if test $LOSS != "TESTKUDOS:0.1"
then
exit_fail "Wrong total bad sig loss, got $LOSS"
fi
+echo PASS
# Undo:
echo "UPDATE deposits SET h_contract_terms='${OLD_H}' WHERE
deposit_serial_id=1" | psql -Aqt $DB
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: make auditor more robust to DB permutations,
gnunet <=