From 3fa213e41e82a93f8f5c5cd59b599ff78d0acc3a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 15 Jan 2020 11:14:11 +0100 Subject: fix test issues --- src/lib/auditor_api_handle.c | 1 + src/lib/exchange_api_reserve.c | 3 +++ src/lib/testing_api_cmd_withdraw.c | 29 ++++++++++++++++------------- 3 files changed, 20 insertions(+), 13 deletions(-) (limited to 'src/lib') diff --git a/src/lib/auditor_api_handle.c b/src/lib/auditor_api_handle.c index a3264c020..f1df204cb 100644 --- a/src/lib/auditor_api_handle.c +++ b/src/lib/auditor_api_handle.c @@ -412,6 +412,7 @@ MAH_path_to_url (struct TALER_AUDITOR_Handle *h, /** * Obtain the URL to use for an API request. + * FIXME: duplicates TEAH_path_to_url2, and likely also logic in util! * * @param base_url base URL of the auditor (i.e. "http://auditor/") * @param path Taler API path (i.e. "/deposit-confirmation") diff --git a/src/lib/exchange_api_reserve.c b/src/lib/exchange_api_reserve.c index 2c62cac20..d63d169b3 100644 --- a/src/lib/exchange_api_reserve.c +++ b/src/lib/exchange_api_reserve.c @@ -1051,6 +1051,9 @@ reserve_withdraw_internal (struct TALER_EXCHANGE_Handle *exchange, GNUNET_free (wsh); return NULL; } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Attempting to withdraw from reserve %s\n", + TALER_B2S (reserve_pub)); wsh->ps = *ps; wsh->url = TEAH_path_to_url (exchange, "/reserve/withdraw"); diff --git a/src/lib/testing_api_cmd_withdraw.c b/src/lib/testing_api_cmd_withdraw.c index f559faf2c..09ab234dd 100644 --- a/src/lib/testing_api_cmd_withdraw.c +++ b/src/lib/testing_api_cmd_withdraw.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2018 Taler Systems SA + Copyright (C) 2018-2020 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -363,8 +363,10 @@ withdraw_traits (void *cls, return GNUNET_SYSERR; } - if (GNUNET_OK != TALER_TESTING_get_trait_reserve_priv - (reserve_cmd, 0, &reserve_priv)) + if (GNUNET_OK != + TALER_TESTING_get_trait_reserve_priv (reserve_cmd, + 0, + &reserve_priv)) { GNUNET_break (0); TALER_TESTING_interpreter_fail (ws->is); @@ -479,16 +481,17 @@ TALER_TESTING_cmd_withdraw_denomination ws->reserve_reference = reserve_reference; ws->pk = dk; ws->expected_response_code = expected_response_code; - - struct TALER_TESTING_Command cmd = { - .cls = ws, - .label = label, - .run = &withdraw_run, - .cleanup = &withdraw_cleanup, - .traits = &withdraw_traits - }; - - return cmd; + { + struct TALER_TESTING_Command cmd = { + .cls = ws, + .label = label, + .run = &withdraw_run, + .cleanup = &withdraw_cleanup, + .traits = &withdraw_traits + }; + + return cmd; + } } -- cgit v1.2.3