summaryrefslogtreecommitdiff
path: root/src/auditor/test-auditor.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-09-17 23:27:29 +0200
committerChristian Grothoff <christian@grothoff.org>2022-09-17 23:27:29 +0200
commitb4b857abeaa0447b8dd4626f303ce7cdb728f0b7 (patch)
treebad1cf371b03c99459fd78bb9122f87b40e1b070 /src/auditor/test-auditor.sh
parentb7bd4579085710787286b01957b84b13b63c50d2 (diff)
downloadexchange-b4b857abeaa0447b8dd4626f303ce7cdb728f0b7.tar.gz
exchange-b4b857abeaa0447b8dd4626f303ce7cdb728f0b7.tar.bz2
exchange-b4b857abeaa0447b8dd4626f303ce7cdb728f0b7.zip
-misc minor fixes
Diffstat (limited to 'src/auditor/test-auditor.sh')
-rwxr-xr-xsrc/auditor/test-auditor.sh29
1 files changed, 18 insertions, 11 deletions
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