summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_merchant_get_tip.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-06-07 23:11:20 +0200
committerChristian Grothoff <christian@grothoff.org>2023-06-07 23:11:20 +0200
commit9725b7d42505d7820fea6e28a638c06b7e81f893 (patch)
treee1a3233e8f2dbe4f61a6c1d1cff4d83f98563594 /src/testing/testing_api_cmd_merchant_get_tip.c
parent0e2148d63b85025c37d4212162a522e47445acab (diff)
downloadmerchant-9725b7d42505d7820fea6e28a638c06b7e81f893.tar.gz
merchant-9725b7d42505d7820fea6e28a638c06b7e81f893.tar.bz2
merchant-9725b7d42505d7820fea6e28a638c06b7e81f893.zip
major libtalertesting API refactoring, including no longer having taler-specific logic in the test engine core
Diffstat (limited to 'src/testing/testing_api_cmd_merchant_get_tip.c')
-rw-r--r--src/testing/testing_api_cmd_merchant_get_tip.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/testing/testing_api_cmd_merchant_get_tip.c b/src/testing/testing_api_cmd_merchant_get_tip.c
index 4dd1613a..26fc4b4d 100644
--- a/src/testing/testing_api_cmd_merchant_get_tip.c
+++ b/src/testing/testing_api_cmd_merchant_get_tip.c
@@ -110,8 +110,9 @@ merchant_get_tip_cb (void *cls,
const struct TALER_Amount *initial_amount;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_set_zero (tsr->details.ok.total_picked_up.currency,
- &expected_total_picked_up));
+ TALER_amount_set_zero (
+ tsr->details.ok.total_picked_up.currency,
+ &expected_total_picked_up));
if (GNUNET_OK !=
TALER_TESTING_get_trait_amount (authorize_cmd,
&initial_amount))
@@ -129,14 +130,14 @@ merchant_get_tip_cb (void *cls,
}
}
{
- const char **justification;
+ const char *justification;
if (GNUNET_OK !=
TALER_TESTING_get_trait_reason (authorize_cmd,
&justification))
TALER_TESTING_FAIL (gts->is);
if (0 != strcmp (tsr->details.ok.reason,
- *justification))
+ justification))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Tip authorized reason does not match\n");
@@ -202,9 +203,11 @@ merchant_get_tip_cb (void *cls,
if ( (GNUNET_OK !=
TALER_amount_cmp_currency (total,
- &tsr->details.ok.pickups[i].requested_amount)) ||
+ &tsr->details.ok.pickups[i].
+ requested_amount)) ||
(0 != TALER_amount_cmp (total,
- &tsr->details.ok.pickups[i].requested_amount)))
+ &tsr->details.ok.pickups[i].
+ requested_amount)))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Pickup planchet sum does not match\n");
@@ -263,14 +266,15 @@ merchant_get_tip_run (void *cls,
TALER_TESTING_FAIL (is);
tgs->is = is;
- tgs->tgh = TALER_MERCHANT_merchant_tip_get (is->ctx,
- tgs->merchant_url,
- tip_id,
- NULL,
- GNUNET_TIME_UNIT_ZERO,
- tgs->fetch_pickups,
- &merchant_get_tip_cb,
- tgs);
+ tgs->tgh = TALER_MERCHANT_merchant_tip_get (
+ TALER_TESTING_interpreter_get_context (is),
+ tgs->merchant_url,
+ tip_id,
+ NULL,
+ GNUNET_TIME_UNIT_ZERO,
+ tgs->fetch_pickups,
+ &merchant_get_tip_cb,
+ tgs);
GNUNET_assert (NULL != tgs->tgh);
}