[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] 01/05: test non 200 response code from /ch
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] 01/05: test non 200 response code from /check-payment. |
Date: |
Tue, 27 Mar 2018 12:21:34 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
commit f73cf1fbd129c25370ed123e0e09042f4d95648d
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Mar 26 11:24:01 2018 +0200
test non 200 response code from /check-payment.
---
src/lib/test_merchant_api_twisted.c | 41 +++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/src/lib/test_merchant_api_twisted.c
b/src/lib/test_merchant_api_twisted.c
index 8bb9d07..1447666 100644
--- a/src/lib/test_merchant_api_twisted.c
+++ b/src/lib/test_merchant_api_twisted.c
@@ -182,6 +182,45 @@ run (void *cls,
struct TALER_TESTING_Command commands[] = {
+ /**** Covering /check-payment ****/
+
+ TALER_TESTING_cmd_proposal
+ ("proposal-for-check-payment",
+ twister_merchant_url,
+ is->ctx,
+ MHD_HTTP_OK,
+ "{\"max_fee\":\
+ {\"currency\":\"EUR\",\
+ \"value\":0,\
+ \"fraction\":50000000},\
+ \"order_id\":\"fail-check-payment-1\",\
+ \"refund_deadline\":\"\\/Date(0)\\/\",\
+ \"pay_deadline\":\"\\/Date(99999999999)\\/\",\
+ \"fulfillment_url\": \"https://example.com/\",\
+ \"amount\":\
+ {\"currency\":\"EUR\",\
+ \"value\":2,\
+ \"fraction\":0},\
+ \"summary\": \"merchant-lib testcase\",\
+ \"products\": [ {\"description\":\"ice cream\",\
+ \"value\":\"{EUR:3}\"} ] }",
+ NULL),
+
+ /* Need any response code != 200. */
+ TALER_TESTING_cmd_hack_response_code
+ ("non-200-response-code",
+ PROXY_MERCHANT_CONFIG_FILE,
+ MHD_HTTP_MULTIPLE_CHOICES),
+
+ TALER_TESTING_cmd_check_payment
+ ("check-payment-fail",
+ twister_merchant_url,
+ is->ctx,
+ MHD_HTTP_MULTIPLE_CHOICES,
+ "proposal-for-check-payment",
+ GNUNET_SYSERR), // any response != 200 gives "syserr"
+
+ TALER_TESTING_cmd_end (),
/**** Covering /proposal lib ****/
@@ -398,6 +437,8 @@ run (void *cls,
10), // nrows
+ /***** Test transactions tracking *****/
+
/**
* Move money to the exchange's bank account.
*/
--
To stop receiving notification emails like this one, please contact
address@hidden