diff options
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 | |||
1105 | 1105 | ||
1106 | echo "PASS" | 1106 | echo "PASS" |
1107 | 1107 | ||
1108 | echo -n "Testing no bogus transfers detected... " | ||
1109 | 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" | ||
1110 | |||
1111 | echo "PASS" | ||
1112 | |||
1108 | # Undo | 1113 | # Undo |
1109 | echo "UPDATE reserves_in SET execution_date='${OLD_TIME}',credit_val=${OLD_VAL} WHERE reserve_in_serial_id=1;" | psql -Aqt $DB | 1114 | echo "UPDATE reserves_in SET execution_date='${OLD_TIME}',credit_val=${OLD_VAL} WHERE reserve_in_serial_id=1;" | psql -Aqt $DB |
1110 | echo "UPDATE reserves SET expiration_date='${OLD_EXP}',current_balance_val=current_balance_val-${VAL_DELTA} WHERE reserve_pub='${RES_PUB}';" | psql -Aqt $DB | 1115 | 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... " | |||
1130 | jq -e .reserve_not_closed_inconsistencies[0] < test-audit.json > /dev/null || exit_fail "Reserve not closed inconsistency not detected" | 1135 | jq -e .reserve_not_closed_inconsistencies[0] < test-audit.json > /dev/null || exit_fail "Reserve not closed inconsistency not detected" |
1131 | echo "PASS" | 1136 | echo "PASS" |
1132 | 1137 | ||
1138 | AMOUNT=`jq -r .total_balance_reserve_not_closed < test-audit.json` | ||
1139 | if test "x$AMOUNT" == "xTESTKUDOS:0" | ||
1140 | then | ||
1141 | exit_fail "Reported total amount wrong: $AMOUNT" | ||
1142 | fi | ||
1143 | |||
1133 | # Undo | 1144 | # Undo |
1134 | echo "UPDATE reserves_in SET execution_date='${OLD_TIME}',credit_val=${OLD_VAL} WHERE reserve_in_serial_id=1;" | psql -Aqt $DB | 1145 | echo "UPDATE reserves_in SET execution_date='${OLD_TIME}',credit_val=${OLD_VAL} WHERE reserve_in_serial_id=1;" | psql -Aqt $DB |
1135 | } | 1146 | } |