From b4b857abeaa0447b8dd4626f303ce7cdb728f0b7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 17 Sep 2022 23:27:29 +0200 Subject: -misc minor fixes --- src/auditor/test-auditor.sh | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'src/auditor/test-auditor.sh') diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh index 4e51eca70..d1e24c199 100755 --- a/src/auditor/test-auditor.sh +++ b/src/auditor/test-auditor.sh @@ -61,18 +61,8 @@ function exit_fail() { exit 1 } -# Cleanup exchange and libeufin between runs. -function cleanup() +function stop_libeufin() { - if test ! -z ${EPID:-} - then - echo -n "Stopping exchange $EPID..." - kill -TERM $EPID - wait $EPID - echo " DONE" - unset EPID - fi - echo "killing libeufin..." if test -f libeufin-sandbox.pid then @@ -84,6 +74,21 @@ function cleanup() echo "Killing libeufin nexus" kill `cat libeufin-nexus.pid 2> /dev/null` &> /dev/null || true fi +} + +# Cleanup exchange and libeufin between runs. +function cleanup() +{ + if test ! -z ${EPID:-} + then + echo -n "Stopping exchange $EPID..." + kill -TERM $EPID + wait $EPID + echo " DONE" + unset EPID + fi + + stop_libeufin echo DONE } @@ -1657,10 +1662,12 @@ function test_27() { WTID=`echo SELECT wtid FROM TalerRequestedPayments WHERE id=1 | sqlite3 $DB.sqlite3` echo WTID=$WTID OTHER_IBAN=`echo -e "SELECT iban FROM BankAccounts WHERE label='fortytwo'" | sqlite3 $DB.sqlite3` + stop_libeufin # 'rawConfirmation' is set to 2 here, that doesn't # point to any record. That's only needed to set a non null value. echo -e "INSERT INTO PaymentInitiations (bankAccount,preparationDate,submissionDate,sum,currency,endToEndId,paymentInformationId,instructionId,subject,creditorIban,creditorBic,creditorName,submitted,messageId,rawConfirmation) VALUES (1,$(date +%s),$(expr $(date +%s) + 2),10,'TESTKUDOS','NOTGIVEN','unused','unused','$WTID http://exchange.example.com/','$OTHER_IBAN','SANDBOXX','Forty Two','unused',1,2)" | sqlite3 $DB.sqlite3 echo -e "INSERT INTO TalerRequestedPayments (facade,payment,requestUid,amount,exchangeBaseUrl,wtid,creditAccount) VALUES (1,2,'unused','TESTKUDOS:1','http://exchange.example.com/','$WTID','payto://iban/SANDBOXX/$OTHER_IBAN?receiver-name=Forty+Two')" | sqlite3 $DB.sqlite3 + launch_libeufin audit_only post_audit -- cgit v1.2.3