summaryrefslogtreecommitdiff
path: root/src/auditor/test-auditor.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-03-14 17:46:53 +0100
committerChristian Grothoff <christian@grothoff.org>2020-03-14 17:46:53 +0100
commitd9c3627bc53fe68184d93dce8df6fbdbe3910827 (patch)
treeed0fd3f429e5a2df65b5860faa2bad8f26ededf6 /src/auditor/test-auditor.sh
parent7ae575dccb8b145d610c1ff7daa132831f0f4683 (diff)
downloadexchange-d9c3627bc53fe68184d93dce8df6fbdbe3910827.tar.gz
exchange-d9c3627bc53fe68184d93dce8df6fbdbe3910827.tar.bz2
exchange-d9c3627bc53fe68184d93dce8df6fbdbe3910827.zip
run closer and transfer with aggregator, check if we actually did get deposit confirmations before running #24
Diffstat (limited to 'src/auditor/test-auditor.sh')
-rwxr-xr-xsrc/auditor/test-auditor.sh48
1 files changed, 30 insertions, 18 deletions
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 5f7d0c8c3..76d74d82c 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -66,6 +66,12 @@ function pre_audit () {
echo -n "Running exchange aggregator ..."
taler-exchange-aggregator -L INFO -t -c $CONF 2> aggregator.log || exit_fail "FAIL"
echo " DONE"
+ echo -n "Running exchange closer ..."
+ taler-exchange-closer -L INFO -t -c $CONF 2> closer.log || exit_fail "FAIL"
+ echo " DONE"
+ echo -n "Running exchange transfer ..."
+ taler-exchange-transfer -L INFO -t -c $CONF 2> transfer.log || exit_fail "FAIL"
+ echo " DONE"
fi
}
@@ -1352,30 +1358,36 @@ function test_24() {
echo "===========24: 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
+CNT=`echo "SELECT COUNT(*) FROM deposit_confirmations;" | psql -Aqt $DB`
+if test x$CNT = x0
+then
+ echo "Skipping deposits missing test: no deposit confirmations in database!"
+else
+ echo "DELETE FROM deposits;" | psql -Aqt $DB
+ echo "DELETE FROM deposits WHERE deposit_serial_id=1;" | psql -Aqt $DB
-run_audit
+ run_audit
-echo -n "Testing inconsistency detection... "
+ echo -n "Testing inconsistency detection... "
-jq -e .deposit_confirmation_inconsistencies[0] < test-audit.json > /dev/null || exit_fail "Deposit confirmation inconsistency NOT detected"
+ jq -e .deposit_confirmation_inconsistencies[0] < test-audit.json > /dev/null || exit_fail "Deposit confirmation inconsistency NOT detected"
-AMOUNT=`jq -er .missing_deposit_confirmation_total < test-audit.json`
-if test x$AMOUNT = xTESTKUDOS:0
-then
- exit_fail "Expected non-zero total missing deposit confirmation amount"
-fi
-COUNT=`jq -er .missing_deposit_confirmation_count < test-audit.json`
-if test x$AMOUNT = x0
-then
- exit_fail "Expected non-zero total missing deposit confirmation count"
-fi
+ AMOUNT=`jq -er .missing_deposit_confirmation_total < test-audit.json`
+ if test x$AMOUNT = xTESTKUDOS:0
+ then
+ exit_fail "Expected non-zero total missing deposit confirmation amount"
+ fi
+ COUNT=`jq -er .missing_deposit_confirmation_count < test-audit.json`
+ if test x$AMOUNT = x0
+ then
+ exit_fail "Expected non-zero total missing deposit confirmation count"
+ fi
-echo PASS
+ echo PASS
-# cannot easily undo DELETE, hence full reload
-full_reload
+ # cannot easily undo DELETE, hence full reload
+ full_reload
+fi
}