[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] 20/22: cause invalid proposal-lookup respo
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] 20/22: cause invalid proposal-lookup response. |
Date: |
Sat, 17 Mar 2018 01:58:45 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
commit 3d93e641817bdbd6d0d0b4af51447661416fc03d
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Mar 16 17:35:56 2018 +0100
cause invalid proposal-lookup response.
---
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 2345567..1882aa2 100644
--- a/src/lib/test_merchant_api_twisted.c
+++ b/src/lib/test_merchant_api_twisted.c
@@ -313,6 +313,47 @@ run (void *cls,
NULL,
"does-not-exist"),
+ /* Generating a proposal-lookup response which doesn't pass
+ * validation, by removing a field that is expected by the
+ * library. The library will call the callback with a status
+ * code of 0. */
+
+ /* First step is to create a _valid_ proposal, so that
+ * we can lookup for it later. */
+ TALER_TESTING_cmd_proposal
+ ("create-proposal-5",
+ twister_merchant_url,
+ is->ctx,
+ MHD_HTTP_OK,
+ "{\"max_fee\":\
+ {\"currency\":\"EUR\",\
+ \"value\":0,\
+ \"fraction\":50000000},\
+ \"order_id\":\"5\",\
+ \"refund_deadline\":\"\\/Date(0)\\/\",\
+ \"pay_deadline\":\"\\/Date(99999999999)\\/\",\
+ \"amount\":\
+ {\"currency\":\"EUR\",\
+ \"value\":5,\
+ \"fraction\":0},\
+ \"summary\": \"merchant-lib testcase\",\
+ \"products\": [ {\"description\":\"ice cream\",\
+ \"value\":\"{EUR:5}\"} ] }",
+ NULL),
+
+ /* Remove expected field. */
+ TALER_TESTING_cmd_delete_object ("remove-contract-terms",
+ PROXY_MERCHANT_CONFIG_FILE,
+ "contract_terms"),
+
+ /* lookup! */
+ TALER_TESTING_cmd_proposal_lookup ("lookup-5",
+ is->ctx,
+ twister_merchant_url,
+ // expected response code.
+ 0,
+ "create-proposal-5",
+ NULL),
/**** Covering /history lib ****/
/**
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-merchant] branch master updated (6f5656a -> 0b14a3f), gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 04/22: check if twister is installed., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 01/22: re-enable twisted tests, gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 08/22: trigger 424, gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 07/22: enabling twisted command., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 19/22: unparsable response for proposal-lookup., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 06/22: multicoin check paid., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 09/22: trigger 424 confict caused by exchange., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 10/22: do not treat 424 Failed Dependency as "unexpected"., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 20/22: cause invalid proposal-lookup response.,
gnunet <=
- [GNUnet-SVN] [taler-merchant] 03/22: comments, gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 14/22: /proposal cb called with response code == 0., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 22/22: fulfillment URL mandatory., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 11/22: typo, gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 05/22: fix multi-coin payment., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 21/22: re-enabling 402 Failed Dependency from /track/transaction., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 15/22: test against invalid proposal., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 02/22: preparing to HTTP response body modification., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 13/22: malforming /history response body, and avoid extracting error codes from NULL responses., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 17/22: trigger 404 @ /proposal, gnunet, 2018/03/16