aboutsummaryrefslogtreecommitdiff
path: root/src/auditor/test-auditor.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditor/test-auditor.sh')
-rwxr-xr-xsrc/auditor/test-auditor.sh11
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
1105 1105
1106echo "PASS" 1106echo "PASS"
1107 1107
1108echo -n "Testing no bogus transfers detected... "
1109jq -e .wire_out_amount_inconsistencies[0] < test-wire-audit.json > /dev/null && exit_fail "Unexpected wire out inconsistency detected in run with reserve closure"
1110
1111echo "PASS"
1112
1108# Undo 1113# Undo
1109echo "UPDATE reserves_in SET execution_date='${OLD_TIME}',credit_val=${OLD_VAL} WHERE reserve_in_serial_id=1;" | psql -Aqt $DB 1114echo "UPDATE reserves_in SET execution_date='${OLD_TIME}',credit_val=${OLD_VAL} WHERE reserve_in_serial_id=1;" | psql -Aqt $DB
1110echo "UPDATE reserves SET expiration_date='${OLD_EXP}',current_balance_val=current_balance_val-${VAL_DELTA} WHERE reserve_pub='${RES_PUB}';" | psql -Aqt $DB 1115echo "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... "
1130jq -e .reserve_not_closed_inconsistencies[0] < test-audit.json > /dev/null || exit_fail "Reserve not closed inconsistency not detected" 1135jq -e .reserve_not_closed_inconsistencies[0] < test-audit.json > /dev/null || exit_fail "Reserve not closed inconsistency not detected"
1131echo "PASS" 1136echo "PASS"
1132 1137
1138AMOUNT=`jq -r .total_balance_reserve_not_closed < test-audit.json`
1139if test "x$AMOUNT" == "xTESTKUDOS:0"
1140then
1141 exit_fail "Reported total amount wrong: $AMOUNT"
1142fi
1143
1133# Undo 1144# Undo
1134echo "UPDATE reserves_in SET execution_date='${OLD_TIME}',credit_val=${OLD_VAL} WHERE reserve_in_serial_id=1;" | psql -Aqt $DB 1145echo "UPDATE reserves_in SET execution_date='${OLD_TIME}',credit_val=${OLD_VAL} WHERE reserve_in_serial_id=1;" | psql -Aqt $DB
1135} 1146}