gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant] 25/31: improve output of test


From: gnunet
Subject: [taler-merchant] 25/31: improve output of test
Date: Thu, 18 Apr 2024 08:39:18 +0200

This is an automated email from the git hooks/post-receive script.

christian-blaettler pushed a commit to branch master
in repository merchant.

commit 38972c5e5941133b53695ab5ad1a6c1452c29056
Author: Christian Blättler <blatc2@bfh.ch>
AuthorDate: Mon Apr 15 20:01:38 2024 +0200

    improve output of test
---
 src/testing/test_merchant_order_creation.sh | 34 +++++++++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)

diff --git a/src/testing/test_merchant_order_creation.sh 
b/src/testing/test_merchant_order_creation.sh
index bf1c5d02..845a356e 100755
--- a/src/testing/test_merchant_order_creation.sh
+++ b/src/testing/test_merchant_order_creation.sh
@@ -246,7 +246,7 @@ echo "OK"
 #
 # CREATE TOKEN FAMILY AND V1 ORDER WITH CHOICES
 #
-echo -n "Creating token family..."
+echo -n "Creating token family ..."
 NOW=$(date +%s)
 IN_A_YEAR=$((NOW + 31536000))
 STATUS=$(curl 'http://localhost:9966/private/tokenfamilies' \
@@ -259,7 +259,9 @@ then
     exit_fail "Expected 204, token family created. got: $STATUS"
 fi
 
-echo -n "Creating v1 order with token family..."
+echo " OK"
+
+echo -n "Creating v1 order with token family ..."
 STATUS=$(curl 'http://localhost:9966/private/orders' \
     -d 
'{"order":{"version":"1","amount":"TESTKUDOS:7","summary":"with_subscription","fulfillment_message":"Payed
 
successfully","choices":[{"inputs":[{"kind":"token","count":1,"token_family_slug":"test-sub","valid_after":{"t_s":'$NOW'}}],"outputs":[{"kind":"token","count":1,"token_family_slug":"test-sub","valid_after":{"t_s":'$NOW'}}]}]}}'
 \
     -w "%{http_code}" -s -o "$LAST_RESPONSE")
@@ -270,6 +272,10 @@ then
     exit_fail "Expected 200, order created. got: $STATUS"
 fi
 
+echo " OK"
+
+echo -n "Claming order with token family ..."
+
 ORDER_ID=$(jq -r .order_id < "$LAST_RESPONSE")
 TOKEN=$(jq -r .token < "$LAST_RESPONSE")
 
@@ -283,6 +289,30 @@ then
     exit_fail "Expected 200, order claimed. got: $STATUS"
 fi
 
+echo " OK"
+
+# echo -n "Fetching pay URL for order ..."
+# STATUS=$(curl "http://localhost:9966/private/orders/${ORDER_ID}"; \
+#     -w "%{http_code}" -s -o "$LAST_RESPONSE")
+
+# if [ "$STATUS" != "200" ]
+# then
+#     jq . < "$LAST_RESPONSE"
+#     exit_fail "Expected 200, getting order info before claming it. got: 
$STATUS"
+# fi
+
+# PAY_URL=$(jq -e -r .taler_pay_uri < "$LAST_RESPONSE")
+
+# echo " OK"
+
+# NOW=$(date +%s)
+
+# echo -n "Pay for order ${PAY_URL} ..."
+# taler-wallet-cli --no-throttle --wallet-db="$WALLET_DB" handle-uri 
"${PAY_URL}" -y 2> wallet-pay1.err > wallet-pay1.log
+# taler-wallet-cli --no-throttle --wallet-db="$WALLET_DB" run-until-done 2> 
wallet-finish-pay1.err > wallet-finish-pay1.log
+# NOW2=$(date +%s)
+# echo " OK (took $(( NOW2 - NOW )) secs )"
+
 #
 # CREATE ORDER WITH NON-INVENTORY AND CHECK
 #

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]