aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-09-15 23:37:43 +0200
committerChristian Grothoff <christian@grothoff.org>2024-09-15 23:37:50 +0200
commit6a1bdea2ffb8590a687722dfd9cd1764f5084e91 (patch)
treeb9009459cbd508e525036d2d86ae03fdc95edf5c /src
parent93bc78c373c0d05c58c4c35eed3256bfce61e1bd (diff)
modernize test-29
Diffstat (limited to 'src')
-rwxr-xr-xsrc/auditor/test-auditor.sh24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index db3aa0880..9628cae17 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -1975,7 +1975,6 @@ function test_28() {
# Test where fees known to the auditor differ from those
# accounted for by the exchange
-# FIXME: test-29 not modernized
function test_29() {
echo "===========29: withdraw fee inconsistency ================="
@@ -1984,22 +1983,15 @@ function test_29() {
run_audit
check_auditor_running
- call_endpoint "balances" "total_balance_summary_delta_minus"
- call_endpoint "amount-arithmetic-inconsistency"
-
echo -n "Testing inconsistency detection... "
- AMOUNT=$(jq -r .balances[0].balance_value < "${MY_TMP_DIR}/total_balance_summary_delta_minus.json")
- if [ "$AMOUNT" == "TESTKUDOS:0" ]
- then
- exit_fail "Reported total amount wrong: $AMOUNT"
- fi
-
- PROFIT=$(jq -r .amount_arithmetic_inconsistency[0].profitable < "${MY_TMP_DIR}/amount-arithmetic-inconsistency.json")
- if [ "$PROFIT" != "true" ]
- then
- exit_fail "Reported wrong profitability: $PROFIT"
- fi
- echo "OK"
+ check_not_balance \
+ "total_balance_summary_delta_minus" \
+ "TESTKUDOS:0" \
+ "Reported total amount wrong"
+ echo -n "Checking report that delta was profitable... "
+ check_report \
+ "amount-arithmetic-inconsistency" \
+ "profitable" "true"
# Undo
echo "UPDATE exchange.denominations SET fee_withdraw.frac=2000000 WHERE (coin).val=1;" | psql -Aqt "$DB"
full_reload