diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-10-28 21:05:53 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-10-28 21:05:53 +0200 |
commit | 7d23dbe6ee21afc6d28df50516e694f205aada29 (patch) | |
tree | c703abe21ce038f68b12c1653df9049a856446df /src/testing/testing_api_cmd_merchant_get_tip.c | |
parent | ca87a98695221ea3b8beb08c40cf04f6afe7bd2c (diff) | |
download | merchant-7d23dbe6ee21afc6d28df50516e694f205aada29.tar.gz merchant-7d23dbe6ee21afc6d28df50516e694f205aada29.tar.bz2 merchant-7d23dbe6ee21afc6d28df50516e694f205aada29.zip |
-work on FTBFS
Diffstat (limited to 'src/testing/testing_api_cmd_merchant_get_tip.c')
-rw-r--r-- | src/testing/testing_api_cmd_merchant_get_tip.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/src/testing/testing_api_cmd_merchant_get_tip.c b/src/testing/testing_api_cmd_merchant_get_tip.c index 7c3daac2..791fc731 100644 --- a/src/testing/testing_api_cmd_merchant_get_tip.c +++ b/src/testing/testing_api_cmd_merchant_get_tip.c @@ -127,13 +127,14 @@ merchant_get_tip_cb (void *cls, // check if the data returned matches that from the POST / PATCH { const struct TALER_Amount *initial_amount; + if (GNUNET_OK != - TALER_TESTING_get_trait_amount_obj (authorize_cmd, - 0, - &initial_amount)) + TALER_TESTING_get_trait_amount (authorize_cmd, + &initial_amount)) TALER_TESTING_FAIL (gts->is); - if ((GNUNET_OK != TALER_amount_cmp_currency (total_authorized, - initial_amount)) || + if ((GNUNET_OK != + TALER_amount_cmp_currency (total_authorized, + initial_amount)) || (0 != TALER_amount_cmp (total_authorized, initial_amount))) { @@ -144,14 +145,14 @@ merchant_get_tip_cb (void *cls, } } { - const char *justification; + const char **justification; + if (GNUNET_OK != - TALER_TESTING_get_trait_string (authorize_cmd, - 0, + TALER_TESTING_get_trait_reason (authorize_cmd, &justification)) TALER_TESTING_FAIL (gts->is); if (0 != strcmp (reason, - justification)) + *justification)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Tip authorized reason does not match\n"); @@ -161,6 +162,7 @@ merchant_get_tip_cb (void *cls, } { const struct GNUNET_TIME_Absolute *tip_expiration; + if (GNUNET_OK != TALER_TESTING_get_trait_absolute_time (authorize_cmd, 0, @@ -189,12 +191,11 @@ merchant_get_tip_cb (void *cls, pickup_cmd = TALER_TESTING_interpreter_lookup_command (gts->is, gts->pickups[i]); { - const uint64_t *num_planchets; + const uint32_t *num_planchets; if (GNUNET_OK != - TALER_TESTING_get_trait_uint64 (pickup_cmd, - 0, - &num_planchets)) + TALER_TESTING_get_trait_num_planchets (pickup_cmd, + &num_planchets)) TALER_TESTING_FAIL (gts->is); if (*num_planchets != pickups[i].num_planchets) @@ -209,16 +210,17 @@ merchant_get_tip_cb (void *cls, const struct TALER_Amount *total; if (GNUNET_OK != - TALER_TESTING_get_trait_amount_obj (pickup_cmd, - pickups[i].num_planchets, - &total)) + TALER_TESTING_get_trait_amounts (pickup_cmd, + pickups[i].num_planchets, + &total)) TALER_TESTING_FAIL (gts->is); - if ((GNUNET_OK != TALER_amount_cmp_currency (total, - &pickups[i]. - requested_amount)) || - (0 != TALER_amount_cmp (total, - &pickups[i].requested_amount))) + if ( (GNUNET_OK != + TALER_amount_cmp_currency (total, + &pickups[i]. + requested_amount)) || + (0 != TALER_amount_cmp (total, + &pickups[i].requested_amount))) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Pickup planchet sum does not match\n"); @@ -271,7 +273,6 @@ merchant_get_tip_run (void *cls, if (GNUNET_OK != TALER_TESTING_get_trait_tip_id (tip_cmd, - 0, &tip_id)) TALER_TESTING_FAIL (is); |