[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] 02/22: preparing to HTTP response body mod
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] 02/22: preparing to HTTP response body modification. |
Date: |
Sat, 17 Mar 2018 01:58:27 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
commit c867eebda512962382b827a0afed27fa6f6ca3b6
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Mar 2 16:40:06 2018 +0100
preparing to HTTP response body modification.
---
src/lib/test_merchant_api_twisted.c | 95 +++++++++++++++++++++++++++++++++++++
1 file changed, 95 insertions(+)
diff --git a/src/lib/test_merchant_api_twisted.c
b/src/lib/test_merchant_api_twisted.c
index 8ffbd2b..47f5714 100644
--- a/src/lib/test_merchant_api_twisted.c
+++ b/src/lib/test_merchant_api_twisted.c
@@ -157,9 +157,104 @@ run (void *cls,
{
struct TALER_TESTING_Command commands[] = {
+
+ /**
+ * Move money to the exchange's bank account.
+ */
+ CMD_TRANSFER_TO_EXCHANGE ("create-reserve-1",
+ "EUR:5.01"),
+ /**
+ * Make a reserve exist, according to the previous
+ * transfer.
+ */
+ CMD_EXEC_WIREWATCH ("wirewatch-1"),
+
+ TALER_TESTING_cmd_check_bank_transfer
+ ("check_bank_transfer-2",
+ "http://localhost:8081/",
+ "EUR:5.01", USER_ACCOUNT_NO, EXCHANGE_ACCOUNT_NO),
+
+ TALER_TESTING_cmd_withdraw_amount ("withdraw-coin-1",
+ is->exchange,
+ "create-reserve-1",
+ "EUR:5",
+ MHD_HTTP_OK),
+ TALER_TESTING_cmd_proposal
+ ("create-proposal-1",
+ merchant_url,
+ is->ctx,
+ MHD_HTTP_OK,
+ "{\"max_fee\":\
+ {\"currency\":\"EUR\",\
+ \"value\":0,\
+ \"fraction\":50000000},\
+ \"order_id\":\"1\",\
+ \"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),
+
+ TALER_TESTING_cmd_check_payment ("check-payment-1",
+ merchant_url,
+ is->ctx,
+ MHD_HTTP_OK,
+ "create-proposal-1",
+ GNUNET_NO),
+
+ TALER_TESTING_cmd_pay ("deposit-simple",
+ merchant_url,
+ is->ctx,
+ MHD_HTTP_OK,
+ "create-proposal-1",
+ "withdraw-coin-1",
+ "EUR:5",
+ "EUR:4.99",
+ "EUR:0.01"),
+
+ TALER_TESTING_cmd_check_payment ("check-payment-2",
+ merchant_url,
+ is->ctx,
+ MHD_HTTP_OK,
+ "create-proposal-1",
+ GNUNET_YES),
+
+ CMD_EXEC_AGGREGATOR ("run-aggregator"),
+
+ TALER_TESTING_cmd_check_bank_transfer
+ ("check_bank_transfer-1",
+ exchange_url,
+ "EUR:4.98", 2, 62),
+
+ #if 0
+ /* Should instead change the response body somehow! */
TALER_TESTING_cmd_hack_response_code ("hack-1",
CONFIG_FILE,
MHD_HTTP_FORBIDDEN),
+ #endif
+
+ TALER_TESTING_cmd_merchant_track_transaction
+ ("track-transaction-1",
+ merchant_url,
+ is->ctx,
+ MHD_HTTP_OK,
+ "check_bank_transfer-1",
+ "deposit-simple",
+ "EUR:0.01"), // ignored
+
+ TALER_TESTING_cmd_merchant_track_transfer
+ ("track-transfer-1",
+ merchant_url,
+ is->ctx,
+ MHD_HTTP_OK,
+ "check_bank_transfer-1",
+ "deposit-simple"),
+
/**
* End the suite. Fixme: better to have a label for this
* too, as it shows a "(null)" token on logs.
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-merchant] 09/22: trigger 424 confict caused by exchange., (continued)
- [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, 2018/03/16
- [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 <=
- [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
- [GNUnet-SVN] [taler-merchant] 16/22: be more gentle with unexpected response codes., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 18/22: proposal-lookup 404 Not Found., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-merchant] 12/22: Double twister instance plus first coverage effort, gnunet, 2018/03/16