[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: add test about transaction inser
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: add test about transaction inserting |
Date: |
Tue, 11 May 2021 16:01:51 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 332630ca add test about transaction inserting
332630ca is described below
commit 332630ca9d99edf69b0525dfe1e62137df346a11
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Tue May 11 11:01:37 2021 -0300
add test about transaction inserting
---
src/testing/test_merchant_order_creation.sh | 45 +++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/src/testing/test_merchant_order_creation.sh
b/src/testing/test_merchant_order_creation.sh
index 13966879..5bc8c649 100755
--- a/src/testing/test_merchant_order_creation.sh
+++ b/src/testing/test_merchant_order_creation.sh
@@ -269,6 +269,51 @@ then
exit_fail "Expected response ok, after providing transfer data. got:
$STATUS"
fi
+
+STATUS=$(curl 'http://localhost:9966/instances/default/private/transfers' \
+ -d
'{"credit_amount":"'$CREDIT_AMOUNT'","wtid":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","payto_uri":"'$TARGET_PAYTO'","exchange_url":"'$WURL'"}'
\
+ -w "%{http_code}" -s -o $LAST_RESPONSE)
+
+jq . < $LAST_RESPONSE
+
+if [ "$STATUS" != "502" ]
+then
+ echo `cat $LAST_RESPONSE`
+ exit_fail "Expected response invalid since the WTID is fake. got: $STATUS"
+fi
+
+STATUS=$(curl 'http://localhost:9966/instances/default/private/transfers' \
+ -w "%{http_code}" -s -o $LAST_RESPONSE)
+
+jq . < $LAST_RESPONSE
+
+if [ "$STATUS" != "200" ]
+then
+ echo `cat $LAST_RESPONSE`
+ exit_fail "Expected response ok. got: $STATUS"
+fi
+
+TRANSFERS_LIST_SIZE=`jq -r '.transfers | length' < $LAST_RESPONSE`
+
+if [ "$TRANSFERS_LIST_SIZE" != "2" ]
+then
+ echo `cat $LAST_RESPONSE`
+ exit_fail "Expected response ok. got: $STATUS"
+fi
+
+#this will triger the GNUNET_break at
taler-merchant-httpd_private-post-transfers.c:1030
+STATUS=$(curl 'http://localhost:9966/instances/default/private/transfers' \
+ -d
'{"credit_amount":"'$CREDIT_AMOUNT'","wtid":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","payto_uri":"'$TARGET_PAYTO'","exchange_url":"'$WURL'"}'
\
+ -w "%{http_code}" -s -o $LAST_RESPONSE)
+
+jq . < $LAST_RESPONSE
+
+if [ "$STATUS" != "502" ]
+then
+ echo `cat $LAST_RESPONSE`
+ exit_fail "Expected response invalid since the WTID is fake. got: $STATUS"
+fi
+
echo " OK"
echo -n "Checking order status ..."
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: add test about transaction inserting,
gnunet <=