-misc minor fixes

This commit is contained in:
Christian Grothoff 2022-09-17 23:27:29 +02:00
parent b7bd457908
commit b4b857abea
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 22 additions and 11 deletions

View File

@ -61,6 +61,21 @@ function exit_fail() {
exit 1 exit 1
} }
function stop_libeufin()
{
echo "killing libeufin..."
if test -f libeufin-sandbox.pid
then
echo "Killing libeufin sandbox"
kill `cat libeufin-sandbox.pid 2> /dev/null` &> /dev/null || true
fi
if test -f libeufin-nexus.pid
then
echo "Killing libeufin nexus"
kill `cat libeufin-nexus.pid 2> /dev/null` &> /dev/null || true
fi
}
# Cleanup exchange and libeufin between runs. # Cleanup exchange and libeufin between runs.
function cleanup() function cleanup()
{ {
@ -73,17 +88,7 @@ function cleanup()
unset EPID unset EPID
fi fi
echo "killing libeufin..." stop_libeufin
if test -f libeufin-sandbox.pid
then
echo "Killing libeufin sandbox"
kill `cat libeufin-sandbox.pid 2> /dev/null` &> /dev/null || true
fi
if test -f libeufin-nexus.pid
then
echo "Killing libeufin nexus"
kill `cat libeufin-nexus.pid 2> /dev/null` &> /dev/null || true
fi
echo DONE echo DONE
} }
@ -1657,10 +1662,12 @@ function test_27() {
WTID=`echo SELECT wtid FROM TalerRequestedPayments WHERE id=1 | sqlite3 $DB.sqlite3` WTID=`echo SELECT wtid FROM TalerRequestedPayments WHERE id=1 | sqlite3 $DB.sqlite3`
echo WTID=$WTID echo WTID=$WTID
OTHER_IBAN=`echo -e "SELECT iban FROM BankAccounts WHERE label='fortytwo'" | sqlite3 $DB.sqlite3` 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 # 'rawConfirmation' is set to 2 here, that doesn't
# point to any record. That's only needed to set a non null value. # 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 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 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 audit_only
post_audit post_audit

View File

@ -1195,6 +1195,8 @@ TALER_wallet_account_merge_verify (
void void
TALER_wallet_account_close_sign ( TALER_wallet_account_close_sign (
// FIXME: add max amount (optional)
// timestamp, target account (optional)
const struct TALER_ReservePrivateKeyP *reserve_priv, const struct TALER_ReservePrivateKeyP *reserve_priv,
struct TALER_ReserveSignatureP *reserve_sig) struct TALER_ReserveSignatureP *reserve_sig)
{ {
@ -1212,6 +1214,8 @@ TALER_wallet_account_close_sign (
enum GNUNET_GenericReturnValue enum GNUNET_GenericReturnValue
TALER_wallet_account_close_verify ( TALER_wallet_account_close_verify (
// FIXME: add max amount (optional),
// timestamp, target account (optional)
const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_ReservePublicKeyP *reserve_pub,
const struct TALER_ReserveSignatureP *reserve_sig) const struct TALER_ReserveSignatureP *reserve_sig)
{ {