diff options
Diffstat (limited to 'src/testing/testing_api_cmd_reserve_status.c')
-rw-r--r-- | src/testing/testing_api_cmd_reserve_status.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/testing/testing_api_cmd_reserve_status.c b/src/testing/testing_api_cmd_reserve_status.c index 9abd99f0b..76639e49c 100644 --- a/src/testing/testing_api_cmd_reserve_status.c +++ b/src/testing/testing_api_cmd_reserve_status.c @@ -138,6 +138,7 @@ analyze_command (const struct TALER_ReservePublicKeyP *reserve_pub, for (unsigned int j = 0; true; j++) { const struct TALER_EXCHANGE_ReserveHistoryEntry *he; + bool matched = false; if (GNUNET_OK != TALER_TESTING_get_trait_reserve_history (cmd, @@ -159,14 +160,18 @@ analyze_command (const struct TALER_ReservePublicKeyP *reserve_pub, &history[i])) { found[i] = true; - return GNUNET_OK; + matched = true; + break; } } - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Command `%s' reserve history entry #%u not found\n", - cmd->label, - j); - return GNUNET_SYSERR; + if (! matched) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Command `%s' reserve history entry #%u not found\n", + cmd->label, + j); + return GNUNET_SYSERR; + } } } } @@ -213,9 +218,13 @@ reserve_status_cb (void *cls, if (0 != TALER_amount_cmp (&eb, &rs->details.ok.balance)) { + GNUNET_break (0); GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Unexpected amount in reserve: %s\n", TALER_amount_to_string (&rs->details.ok.balance)); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Expected balance of: %s\n", + TALER_amount_to_string (&eb)); TALER_TESTING_interpreter_fail (ss->is); return; } |