[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] 260/277: fix #6236
From: |
gnunet |
Subject: |
[taler-merchant] 260/277: fix #6236 |
Date: |
Sun, 05 Jul 2020 20:52:53 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
commit 4b820e27ad2fdfda79e256c0b0624ad01150c5b3
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Jun 27 18:31:02 2020 +0200
fix #6236
---
src/testing/testing_api_cmd_post_transfers.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/testing/testing_api_cmd_post_transfers.c
b/src/testing/testing_api_cmd_post_transfers.c
index f5087c2..ad16a86 100644
--- a/src/testing/testing_api_cmd_post_transfers.c
+++ b/src/testing/testing_api_cmd_post_transfers.c
@@ -184,6 +184,7 @@ transfers_cb (void *cls,
const struct TALER_TESTING_Command *cmd;
const json_t *contract_terms;
const struct TALER_Amount *deposit_value;
+ const struct TALER_Amount *deposit_fee;
const char *order_id;
cmd = TALER_TESTING_interpreter_lookup_command (pts->is,
@@ -200,8 +201,12 @@ transfers_cb (void *cls,
&contract_terms)) ||
(GNUNET_OK !=
TALER_TESTING_get_trait_amount_obj (cmd,
- 0,
- &deposit_value)) )
+
TALER_TESTING_CMD_DEPOSIT_TRAIT_IDX_DEPOSIT_VALUE,
+ &deposit_value)) ||
+ (GNUNET_OK !=
+ TALER_TESTING_get_trait_amount_obj (cmd,
+
TALER_TESTING_CMD_DEPOSIT_TRAIT_IDX_DEPOSIT_FEE,
+ &deposit_fee)) )
{
GNUNET_break (0);
TALER_TESTING_interpreter_fail (pts->is);
@@ -227,7 +232,15 @@ transfers_cb (void *cls,
TALER_TESTING_interpreter_fail (pts->is);
return;
}
- // FIXME #6236: also would want to add deposit_fees, but unavailable
as traits right now!
+ if (0 >
+ TALER_amount_add (&fees,
+ &fees,
+ deposit_fee))
+ {
+ GNUNET_break (0);
+ TALER_TESTING_interpreter_fail (pts->is);
+ return;
+ }
}
if (0 !=
TALER_amount_cmp (&sum,
@@ -237,10 +250,9 @@ transfers_cb (void *cls,
TALER_TESTING_interpreter_fail (pts->is);
return;
}
-#if FIXME6236
if (0 !=
TALER_amount_cmp (&fees,
- tdd->deposit_fee))
+ &tdd->deposit_fee))
{
GNUNET_break (0);
TALER_TESTING_interpreter_fail (pts->is);
@@ -254,18 +266,15 @@ transfers_cb (void *cls,
TALER_amount_subtract (&total,
&total,
&tdd->deposit_fee));
-#endif
}
-#if FIXME6236
if (0 !=
TALER_amount_cmp (&total,
- pts->credit_amount))
+ &pts->credit_amount))
{
GNUNET_break (0);
TALER_TESTING_interpreter_fail (pts->is);
return;
}
-#endif
break;
}
default:
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-merchant] 255/277: deeper checks for merchant get order, (continued)
- [taler-merchant] 255/277: deeper checks for merchant get order, gnunet, 2020/07/05
- [taler-merchant] 248/277: deeper checks on GET /private/orders, gnunet, 2020/07/05
- [taler-merchant] 241/277: clarify with/without wire fee issue, gnunet, 2020/07/05
- [taler-merchant] 244/277: use and handle all /pay status codes, gnunet, 2020/07/05
- [taler-merchant] 247/277: harder tests for GET /private/instances, GET /private/products, gnunet, 2020/07/05
- [taler-merchant] 249/277: made a testing trait for order claim nonce, gnunet, 2020/07/05
- [taler-merchant] 251/277: wallet get order handles refunds properly, gnunet, 2020/07/05
- [taler-merchant] 256/277: test for auto marking orders as wired after inserting sufficient transfers, gnunet, 2020/07/05
- [taler-merchant] 258/277: excluded doc/doxygen from gitignore, gnunet, 2020/07/05
- [taler-merchant] 257/277: updated doxygen generation, gnunet, 2020/07/05
- [taler-merchant] 260/277: fix #6236,
gnunet <=
- [taler-merchant] 262/277: deduplicate logic, gnunet, 2020/07/05
- [taler-merchant] 264/277: filler max_upload values for all POST/PATCH handlers, gnunet, 2020/07/05
- [taler-merchant] 265/277: got tips test working again, gnunet, 2020/07/05
- [taler-merchant] 261/277: removed hardcoded row numbers from backenddb tests, gnunet, 2020/07/05
- [taler-merchant] 263/277: long polling test for GET /private/orders, gnunet, 2020/07/05
- [taler-merchant] 270/277: twister, get tips, instance, and post transfer tests, gnunet, 2020/07/05
- [taler-merchant] 259/277: more docs/thorough checks for backend db & long polling for merchant get order, gnunet, 2020/07/05
- [taler-merchant] 266/277: get reserve and tip testing commands use variadic args, gnunet, 2020/07/05
- [taler-merchant] 267/277: get pay-again and pay-abort working again, gnunet, 2020/07/05
- [taler-merchant] 272/277: more merchant benchmark cleanup, gnunet, 2020/07/05