summaryrefslogtreecommitdiff
path: root/src/bank-lib/testing_api_cmd_history.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bank-lib/testing_api_cmd_history.c')
-rw-r--r--src/bank-lib/testing_api_cmd_history.c52
1 files changed, 27 insertions, 25 deletions
diff --git a/src/bank-lib/testing_api_cmd_history.c b/src/bank-lib/testing_api_cmd_history.c
index c5b31197d..ca8613141 100644
--- a/src/bank-lib/testing_api_cmd_history.c
+++ b/src/bank-lib/testing_api_cmd_history.c
@@ -809,6 +809,7 @@ history_cb (void *cls,
struct TALER_TESTING_Interpreter *is = cls;
struct HistoryState *hs = is->commands[is->ip].cls;
+ (void) row_id;
/*NOTE: "204 No Content" is used to signal the end of results.*/
if (MHD_HTTP_NO_CONTENT == http_status)
{
@@ -821,16 +822,19 @@ history_cb (void *cls,
GNUNET_break (0);
total = build_history (is, &h);
- GNUNET_log
- (GNUNET_ERROR_TYPE_ERROR,
- "Expected history of length %llu, got %llu;"
- " HTTP status code: %u, failed: %d\n",
- (unsigned long long) total,
- (unsigned long long) hs->results_obtained,
- http_status,
- hs->failed);
- print_expected (h, total, UINT_MAX);
- free_history (h, total);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Expected history of length %llu, got %llu;"
+ " HTTP status code: %u/%d, failed: %d\n",
+ (unsigned long long) total,
+ (unsigned long long) hs->results_obtained,
+ http_status,
+ (int) ec,
+ hs->failed);
+ print_expected (h,
+ total,
+ UINT_MAX);
+ free_history (h,
+ total);
TALER_TESTING_interpreter_fail (is);
return;
}
@@ -841,10 +845,9 @@ history_cb (void *cls,
if (MHD_HTTP_OK != http_status)
{
hs->hh = NULL;
- GNUNET_log
- (GNUNET_ERROR_TYPE_ERROR,
- "Unwanted response code from /history[-range]: %u\n",
- http_status);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Unwanted response code from /history[-range]: %u\n",
+ http_status);
TALER_TESTING_interpreter_fail (is);
return;
}
@@ -894,6 +897,7 @@ history_run (void *cls,
const uint64_t *row_id_ptr = &row_id;
struct TALER_BANK_AuthenticationData *auth;
+ (void) cmd;
/* Get row_id from trait. */
if (NULL != hs->start_row_reference)
{
@@ -942,15 +946,14 @@ history_range_run (void *cls,
const struct TALER_TESTING_Command *cmd,
struct TALER_TESTING_Interpreter *is)
{
-
struct HistoryState *hs = cls;
const struct GNUNET_TIME_Absolute *start_date;
const struct GNUNET_TIME_Absolute *end_date;
struct TALER_BANK_AuthenticationData *auth;
+ (void) cmd;
if (NULL != hs->start_row_reference)
{
-
const struct TALER_TESTING_Command *history_cmd;
history_cmd = TALER_TESTING_interpreter_lookup_command
@@ -974,7 +977,6 @@ history_range_run (void *cls,
if (NULL != hs->end_row_reference)
{
-
const struct TALER_TESTING_Command *history_cmd;
history_cmd = TALER_TESTING_interpreter_lookup_command
@@ -1024,6 +1026,7 @@ history_cleanup (void *cls,
{
struct HistoryState *hs = cls;
+ (void) cmd;
if (NULL != hs->hh)
{
TALER_LOG_WARNING ("/history did not complete\n");
@@ -1050,14 +1053,13 @@ history_cleanup (void *cls,
* @return the command.
*/
struct TALER_TESTING_Command
-TALER_TESTING_cmd_bank_history
- (const char *label,
- const char *bank_url,
- uint64_t account_no,
- enum TALER_BANK_Direction direction,
- unsigned int ascending,
- const char *start_row_reference,
- unsigned long long num_results)
+TALER_TESTING_cmd_bank_history (const char *label,
+ const char *bank_url,
+ uint64_t account_no,
+ enum TALER_BANK_Direction direction,
+ unsigned int ascending,
+ const char *start_row_reference,
+ unsigned long long num_results)
{
struct HistoryState *hs;