From 9725b7d42505d7820fea6e28a638c06b7e81f893 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 7 Jun 2023 23:11:20 +0200 Subject: major libtalertesting API refactoring, including no longer having taler-specific logic in the test engine core --- src/testing/testing_api_cmd_merchant_get_tip.c | 32 +++++++++++++++----------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'src/testing/testing_api_cmd_merchant_get_tip.c') 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); } -- cgit v1.2.3