From 1c5fa025cc4a6369f585cb5b169cc677d093d30d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 14 Apr 2021 17:56:01 +0200 Subject: test for #6836 -- passes --- src/testing/test_key_rotation.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'src/testing/test_key_rotation.sh') diff --git a/src/testing/test_key_rotation.sh b/src/testing/test_key_rotation.sh index 73e55120..ad5d4ae4 100755 --- a/src/testing/test_key_rotation.sh +++ b/src/testing/test_key_rotation.sh @@ -8,6 +8,10 @@ NORM="$(tput sgr0)" set -eu +# We use VERY short withdraw periods, set flag to +# tell wallet explicitly that this is OK... +export TALER_WALLET_DEBUG_DENOMSEL_ALLOW_LATE=1 + # Exit, with status code "skip" (no 'real' failure) function exit_skip() { echo " SKIP: $1" @@ -189,7 +193,7 @@ ORDER_2=`curl -s -H "Content-Type: application/json" -X POST \ http://localhost:9966/private/orders \ -d '{"create_token":false, "order":{"amount":"TESTKUDOS:0.01","summary":"Minimal test order #2"}}' \ | jq -er '.order_id'` -PAY2=taler+http://pay/localhost:9966/${ORDER_1}/ +PAY2=taler+http://pay/localhost:9966/${ORDER_2}/ if [ "$STATUS" != "204" ] @@ -201,7 +205,11 @@ fi echo "OK" -bash +export CONF +export AUDITOR_PUB +export AUDITOR_URL +export EXCHANGE_URL +export WALLET_DB echo -n "Setting up keys ..." taler-exchange-offline -c $CONF \ @@ -248,16 +256,17 @@ taler-wallet-cli --no-throttle --wallet-db=$WALLET_DB api 'withdrawTestBalance' }' \ --arg BANK_URL "$BANK_URL" \ --arg EXCHANGE_URL "$EXCHANGE_URL" - )" 2> /dev/null >/dev/null -taler-wallet-cli --wallet-db=$WALLET_DB run-until-done 2>/dev/null >/dev/null + )" 2>wallet-withdraw-1.err >wallet-withdraw-1.out +taler-wallet-cli --wallet-db=$WALLET_DB run-until-done 2>wallet-withdraw-finish-1.err >wallet-withdraw-finish-1.out echo " OK" + echo -n "Pay first order ..." -taler-wallet-cli --no-throttle --wallet-db=$WALLET_DB handle-uri ${PAY1} 2> wallet-pay1.err > wallet-pay1.log +taler-wallet-cli --no-throttle --wallet-db=$WALLET_DB handle-uri ${PAY1} -y 2> wallet-pay1.err > wallet-pay1.log echo " OK" echo -n "Wait for old keys to definitively expire..." -sleep 15 +sleep 60 echo " OK" echo -n "Updating keys ..." @@ -285,7 +294,7 @@ taler-wallet-cli --wallet-db=$WALLET_DB run-until-done 2>/dev/null >/dev/null echo " OK" echo -n "Pay second order ..." -taler-wallet-cli --no-throttle --wallet-db=$WALLET_DB handle-uri ${PAY2} 2> wallet-pay1.err > wallet-pay1.log +taler-wallet-cli --no-throttle --wallet-db=$WALLET_DB handle-uri ${PAY2} -y 2> wallet-pay2.err > wallet-pay2.log echo " OK" -- cgit v1.2.3