-misc auditor fixes

This commit is contained in:
Christian Grothoff 2023-07-19 00:49:50 +02:00
parent 37d2ae263c
commit e6d430f289
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -1027,7 +1027,7 @@ function test_8() {
stop_libeufin stop_libeufin
OLD_ID=$(echo "SELECT id FROM NexusBankTransactions WHERE amount='10' AND currency='TESTKUDOS' ORDER BY id LIMIT 1;" | psql "${DB}" -Aqt) \ OLD_ID=$(echo "SELECT id FROM NexusBankTransactions WHERE amount='10' AND currency='TESTKUDOS' ORDER BY id LIMIT 1;" | psql "${DB}" -Aqt) \
|| exit_fail "Failed to SELECT FROM NexusBankTransactions nexus DB!" || exit_fail "Failed to SELECT FROM NexusBankTransactions nexus DB!"
OLD_WTID=$(echo "SELECT 'reservePublicKey' FROM TalerIncomingPayments WHERE payment='$OLD_ID';" \ OLD_WTID=$(echo "SELECT \"reservePublicKey\" FROM TalerIncomingPayments WHERE payment='$OLD_ID';" \
| psql "${DB}" -Aqt) | psql "${DB}" -Aqt)
NEW_WTID="CK9QBFY972KR32FVA1MW958JWACEB6XCMHHKVFMCH1A780Q12SVG" NEW_WTID="CK9QBFY972KR32FVA1MW958JWACEB6XCMHHKVFMCH1A780Q12SVG"
echo "UPDATE TalerIncomingPayments SET \"reservePublicKey\"='$NEW_WTID' WHERE payment='$OLD_ID';" \ echo "UPDATE TalerIncomingPayments SET \"reservePublicKey\"='$NEW_WTID' WHERE payment='$OLD_ID';" \
@ -1043,9 +1043,9 @@ function test_8() {
exit_fail "Diagnostic wrong: $DIAG (0)" exit_fail "Diagnostic wrong: $DIAG (0)"
fi fi
WTID=$(jq -r .reserve_in_amount_inconsistencies[0].reserve_pub < test-audit-wire.json) WTID=$(jq -r .reserve_in_amount_inconsistencies[0].reserve_pub < test-audit-wire.json)
if [ "x$WTID" != x"$OLD_WTID" ] && [ "x$WTID" != "x$NEW_WTID" ] if [ "$WTID" != "$OLD_WTID" ] && [ "$WTID" != "$NEW_WTID" ]
then then
exit_fail "WTID reported wrong: $WTID" exit_fail "WTID reported wrong: $WTID (wanted $OLD_WTID or $NEW_WTID)"
fi fi
EX_A=$(jq -r .reserve_in_amount_inconsistencies[0].amount_exchange_expected < test-audit-wire.json) EX_A=$(jq -r .reserve_in_amount_inconsistencies[0].amount_exchange_expected < test-audit-wire.json)
if [ "$WTID" = "$OLD_WTID" ] && [ "$EX_A" != "TESTKUDOS:10" ] if [ "$WTID" = "$OLD_WTID" ] && [ "$EX_A" != "TESTKUDOS:10" ]