From 96543f62ef21375b3b04fee7eb97ee28fe5268e0 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 17 Jan 2020 23:21:14 +0100 Subject: [PATCH] updates to auditor test --- contrib/auditor-report.tex.j2 | 8 ++++---- src/auditor/test-auditor.sh | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/contrib/auditor-report.tex.j2 b/contrib/auditor-report.tex.j2 index f8518856e..cdcbc067f 100644 --- a/contrib/auditor-report.tex.j2 +++ b/contrib/auditor-report.tex.j2 @@ -661,18 +661,18 @@ incoming wire transfers does not match with that of the bank. {\bf All incoming wire transfer amounts and subjects matched up.} {% else %} \begin{longtable}{p{5.5cm}|r|r} - \multicolumn{2}{l}{ {\bf Wire transfer identifier} ({\bf Row}) } \\ + \multicolumn{2}{l}{ {\bf Reserve Public Key} ({\bf Row}) } \\ \multicolumn{3}{l}{ {\bf Diagnostic} } \\ {\bf When} & {\bf Wired} & {\bf Expected} \\ \hline \hline \endfirsthead - \multicolumn{2}{l}{ {\bf Wire transfer identifier} ({\bf Row}) } \\ + \multicolumn{2}{l}{ {\bf Reserve Public Key} ({\bf Row}) } \\ \multicolumn{3}{l}{ {\bf Diagnostic} } \\ {\bf When} & {\bf Wired} & {\bf Expected} \\ \hline \hline \endhead \hline \hline - \multicolumn{2}{l}{ {\bf Wire transfer identifier} ({\bf Row}) } \\ + \multicolumn{2}{l}{ {\bf Reserve Public Key} ({\bf Row}) } \\ \multicolumn{3}{l}{ {\bf Diagnostic} } \\ {\bf When} & {\bf Wired} & {\bf Expected} \\ \endfoot @@ -684,7 +684,7 @@ incoming wire transfers does not match with that of the bank. \label{table:wire_in:transfer_amount_inconsistencies} \endlastfoot {% for item in wire.reserve_in_amount_inconsistencies %} - \multicolumn{3}{l}{ {\tt \small {{ item.wtid }} } ({{ item.row }}) } \\ + \multicolumn{3}{l}{ {\tt \small {{ item.reserve_pub }} } ({{ item.row }}) } \\ \nopagebreak \multicolumn{3}{l}{ {{ item.diagnostic }} } \\ \nopagebreak diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh index 325b207c7..f10718eec 100755 --- a/src/auditor/test-auditor.sh +++ b/src/auditor/test-auditor.sh @@ -572,7 +572,7 @@ echo "UPDATE reserves_out SET reserve_sig='$OLD_SIG' WHERE h_blind_ev='$HBE'" | function test_8() { echo "===========8: wire-transfer-subject disagreement===========" -OLD_ID=`echo "SELECT id FROM app_banktransaction WHERE amount='TESTKUDOS:10.00' ORDER BY id LIMIT 1;" | psql $DB -Aqt` +OLD_ID=`echo "SELECT id FROM app_banktransaction WHERE amount='TESTKUDOS:10' ORDER BY id LIMIT 1;" | psql $DB -Aqt` OLD_WTID=`echo "SELECT subject FROM app_banktransaction WHERE id='$OLD_ID';" | psql $DB -Aqt` NEW_WTID="CK9QBFY972KR32FVA1MW958JWACEB6XCMHHKVFMCH1A780Q12SVG" echo "UPDATE app_banktransaction SET subject='$NEW_WTID' WHERE id='$OLD_ID';" | psql -Aqt $DB @@ -642,7 +642,7 @@ echo "UPDATE app_banktransaction SET subject='$OLD_WTID' WHERE id='$OLD_ID';" | function test_9() { echo "===========9: wire-origin disagreement===========" -OLD_ID=`echo "SELECT id FROM app_banktransaction WHERE amount='TESTKUDOS:10.00' ORDER BY id LIMIT 1;" | psql $DB -Aqt` +OLD_ID=`echo "SELECT id FROM app_banktransaction WHERE amount='TESTKUDOS:10' ORDER BY id LIMIT 1;" | psql $DB -Aqt` OLD_ACC=`echo "SELECT debit_account_id FROM app_banktransaction WHERE id='$OLD_ID';" | psql $DB -Aqt` echo "UPDATE app_banktransaction SET debit_account_id=1;" | psql -Aqt $DB @@ -671,7 +671,7 @@ echo "UPDATE app_banktransaction SET debit_account_id=$OLD_ACC;" | psql -Aqt $DB function test_10() { echo "===========10: wire-timestamp disagreement===========" -OLD_ID=`echo "SELECT id FROM app_banktransaction WHERE amount='TESTKUDOS:10.00' ORDER BY id LIMIT 1;" | psql $DB -Aqt` +OLD_ID=`echo "SELECT id FROM app_banktransaction WHERE amount='TESTKUDOS:10' ORDER BY id LIMIT 1;" | psql $DB -Aqt` OLD_DATE=`echo "SELECT date FROM app_banktransaction WHERE id='$OLD_ID';" | psql $DB -Aqt` echo "UPDATE app_banktransaction SET date=NOW() WHERE id=$OLD_ID;" | psql -Aqt $DB @@ -700,7 +700,7 @@ echo "UPDATE app_banktransaction SET date='$OLD_DATE' WHERE id=$OLD_ID;" | psql function test_11() { echo "===========11: spurious outgoing transfer ===========" -OLD_ID=`echo "SELECT id FROM app_banktransaction WHERE amount='TESTKUDOS:10.00' ORDER BY id LIMIT 1;" | psql $DB -Aqt` +OLD_ID=`echo "SELECT id FROM app_banktransaction WHERE amount='TESTKUDOS:10' ORDER BY id LIMIT 1;" | psql $DB -Aqt` OLD_ACC=`echo "SELECT debit_account_id FROM app_banktransaction WHERE id=$OLD_ID;" | psql $DB -Aqt` # Change wire transfer to be FROM the exchange (#2) to elsewhere! # (Note: this change also causes a missing incoming wire transfer, but @@ -1254,7 +1254,7 @@ then # remove transaction from bank DB - echo "DELETE FROM app_banktransaction WHERE debit_account_id=2 AND amount='TESTKUDOS:${VAL_DELTA}.00';" | psql -Aqt $DB + echo "DELETE FROM app_banktransaction WHERE debit_account_id=2 AND amount='TESTKUDOS:${VAL_DELTA}';" | psql -Aqt $DB audit_only post_audit