[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] 02/02: Reproducing #5366 within test cases
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] 02/02: Reproducing #5366 within test cases. |
Date: |
Thu, 28 Jun 2018 11:42: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 cbd2ca3f1e75b84758bc5bd4275e49702e2844c1
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Jun 28 11:42:05 2018 +0200
Reproducing #5366 within test cases.
---
src/lib/test_merchant_api_new.c | 73 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/src/lib/test_merchant_api_new.c b/src/lib/test_merchant_api_new.c
index 17fcd5b..9912b19 100644
--- a/src/lib/test_merchant_api_new.c
+++ b/src/lib/test_merchant_api_new.c
@@ -335,6 +335,76 @@ run (void *cls,
TALER_TESTING_cmd_end ()
};
+ /**
+ * This block tests whether a refund_deadline and/or
+ * wire_transfer_deadline very far in the future do NOT
+ * result in any wire transfer from the aggregator (#5366).
+ */
+ struct TALER_TESTING_Command unaggregation[] = {
+
+ CMD_TRANSFER_TO_EXCHANGE
+ ("create-reserve-unaggregation",
+ "EUR:5.01"),
+
+ CMD_EXEC_WIREWATCH
+ ("wirewatch-unaggregation"),
+
+ TALER_TESTING_cmd_check_bank_transfer
+ ("check_bank_transfer-unaggregation",
+ EXCHANGE_URL,
+ "EUR:5.01",
+ USER_ACCOUNT_NO,
+ EXCHANGE_ACCOUNT_NO),
+
+ TALER_TESTING_cmd_withdraw_amount
+ ("withdraw-coin-unaggregation",
+ is->exchange,
+ "create-reserve-unaggregation",
+ "EUR:5",
+ MHD_HTTP_OK),
+
+ TALER_TESTING_cmd_proposal
+ ("create-proposal-unaggregation",
+ merchant_url,
+ is->ctx,
+ MHD_HTTP_OK,
+ "{\"max_fee\":\
+ {\"currency\":\"EUR\",\
+ \"value\":0,\
+ \"fraction\":50000000},\
+ \"refund_deadline\":\"\\/Date(2)\\/\",\
+ \"pay_deadline\":\"\\/Date(1)\\/\",\
+ \"wire_transfer_delay\":\"\\/Delay(3)\\/\",\
+ \"amount\":\
+ {\"currency\":\"EUR\",\
+ \"value\":5,\
+ \"fraction\":0},\
+ \"summary\": \"unaggregated product\",\
+ \"fulfillment_url\": \"https://example.com/\",\
+ \"products\": [ {\"description\":\"unaggregated cream\",\
+ \"value\":\"{EUR:5}\"} ] }",
+ NULL),
+
+ TALER_TESTING_cmd_pay
+ ("pay-unaggregation",
+ merchant_url,
+ is->ctx,
+ MHD_HTTP_OK,
+ "create-proposal-unaggregation",
+ "withdraw-coin-unaggregation",
+ "EUR:5", // amount + fee
+ "EUR:4.99", // amount - fee
+ "EUR:0.01"), // refund fee
+
+ CMD_EXEC_AGGREGATOR
+ ("aggregation-attempt"),
+
+ TALER_TESTING_cmd_check_bank_empty
+ ("check_bank_unaggregated"),
+
+ TALER_TESTING_cmd_end ()
+ };
+
struct TALER_TESTING_Command track[] = {
TALER_TESTING_cmd_merchant_track_transaction
@@ -1050,6 +1120,9 @@ run (void *cls,
TALER_TESTING_cmd_batch ("double-spending",
double_spending),
+ TALER_TESTING_cmd_batch ("unaggregation",
+ unaggregation),
+
TALER_TESTING_cmd_batch ("track",
track),
--
To stop receiving notification emails like this one, please contact
address@hidden