diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-06 16:54:09 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-06 16:54:09 +0200 |
commit | 165929a877c97e1061226bca961be5b4ab9f27fc (patch) | |
tree | 40bca14088b56be854ee5b3f131881c3ba0ce297 /src/auditor/test-auditor.sh | |
parent | e308d83f1bf4c59c034f91744c59296d97aba5fa (diff) | |
download | exchange-165929a877c97e1061226bca961be5b4ab9f27fc.tar.xz |
consider reserve closures as well when auditing outgoing wire transfers
Diffstat (limited to 'src/auditor/test-auditor.sh')
-rwxr-xr-x | src/auditor/test-auditor.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh index 93047d8b2..67ed901f8 100755 --- a/src/auditor/test-auditor.sh +++ b/src/auditor/test-auditor.sh @@ -1105,6 +1105,11 @@ jq -e .reserve_not_closed_inconsistencies[0] < test-audit.json > /dev/null && ex echo "PASS" +echo -n "Testing no bogus transfers detected... " +jq -e .wire_out_amount_inconsistencies[0] < test-wire-audit.json > /dev/null && exit_fail "Unexpected wire out inconsistency detected in run with reserve closure" + +echo "PASS" + # Undo echo "UPDATE reserves_in SET execution_date='${OLD_TIME}',credit_val=${OLD_VAL} WHERE reserve_in_serial_id=1;" | psql -Aqt $DB echo "UPDATE reserves SET expiration_date='${OLD_EXP}',current_balance_val=current_balance_val-${VAL_DELTA} WHERE reserve_pub='${RES_PUB}';" | psql -Aqt $DB @@ -1130,6 +1135,12 @@ echo -n "Testing reserve closure missing detected... " jq -e .reserve_not_closed_inconsistencies[0] < test-audit.json > /dev/null || exit_fail "Reserve not closed inconsistency not detected" echo "PASS" +AMOUNT=`jq -r .total_balance_reserve_not_closed < test-audit.json` +if test "x$AMOUNT" == "xTESTKUDOS:0" +then + exit_fail "Reported total amount wrong: $AMOUNT" +fi + # Undo echo "UPDATE reserves_in SET execution_date='${OLD_TIME}',credit_val=${OLD_VAL} WHERE reserve_in_serial_id=1;" | psql -Aqt $DB } |