[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.
- [taler-merchant] 19/31: implement memory management review feedback, (continued)
- [taler-merchant] 19/31: implement memory management review feedback, gnunet, 2024/04/18
- [taler-merchant] 08/31: parse v0 max_fee into limits struct, gnunet, 2024/04/18
- [taler-merchant] 23/31: Merge branch 'master' into tokens, gnunet, 2024/04/18
- [taler-merchant] 10/31: remove unused merchant_pub field (set directly in serialize order phase), gnunet, 2024/04/18
- [taler-merchant] 16/31: simplify contract structs, gnunet, 2024/04/18
- [taler-merchant] 12/31: first shot at v1 contract serialization, gnunet, 2024/04/18
- [taler-merchant] 18/31: first smoke tests, gnunet, 2024/04/18
- [taler-merchant] 29/31: update build system, gnunet, 2024/04/18
- [taler-merchant] 09/31: build merchant information in serialization phase, gnunet, 2024/04/18
- [taler-merchant] 31/31: test_merchant_api_* passing, gnunet, 2024/04/18
- [taler-merchant] 25/31: improve output of test,
gnunet <=
- [taler-merchant] 30/31: ignore clang files, gnunet, 2024/04/18
- [taler-merchant] 24/31: add test for order creation with v1 contract, gnunet, 2024/04/18
- [taler-merchant] 22/31: Merge branch 'master' into tokens, gnunet, 2024/04/18
- [taler-merchant] 14/31: db: add lookup function for token family key, gnunet, 2024/04/18
- [taler-merchant] 21/31: serialize v1 orders, gnunet, 2024/04/18
- [taler-merchant] 06/31: add limits datastructure, move brutto to contract instead of choice, gnunet, 2024/04/18
- [taler-merchant] 28/31: implement orders with choices test case, gnunet, 2024/04/18
- [taler-merchant] 26/31: add token family GET and POST handlers to merchant lib, gnunet, 2024/04/18