From 00625791a2c596eed9636fb4ac550f2481ceb14c Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Wed, 12 Dec 2018 14:57:21 +0100 Subject: [PATCH] Issue #5462. Defining batch that makes->destroys->check a reserve. Iterating the batch N times is the next step. --- src/exchange-lib/test_exchange_api_new.c | 14 +++++--------- src/exchange-lib/testing_api_cmd_status.c | 5 ++++- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/exchange-lib/test_exchange_api_new.c b/src/exchange-lib/test_exchange_api_new.c index b69258995..854558ef7 100644 --- a/src/exchange-lib/test_exchange_api_new.c +++ b/src/exchange-lib/test_exchange_api_new.c @@ -909,17 +909,16 @@ run (void *cls, ("reserve-open-close-wirewatch", CONFIG_FILE_EXPIRE_RESERVE_NOW), - TALER_TESTING_cmd_status ("reserve-open-close-status", - is->exchange, - "reserve-open-close-key", - "EUR:0", - MHD_HTTP_OK), - /* Wire back to the bank */ TALER_TESTING_cmd_exec_aggregator ("reserve-open-close-aggregation", CONFIG_FILE_EXPIRE_RESERVE_NOW), + TALER_TESTING_cmd_status ("reserve-open-close-status", + is->exchange, + "reserve-open-close-key", + "EUR:0", + MHD_HTTP_OK), TALER_TESTING_cmd_end () }; @@ -949,11 +948,8 @@ run (void *cls, TALER_TESTING_cmd_batch ("payback", payback), - #if 0 TALER_TESTING_cmd_batch ("reserve-open-close", reserve_open_close), - #endif - /** * End the suite. Fixme: better to have a label for this * too, as it shows a "(null)" token on logs. diff --git a/src/exchange-lib/testing_api_cmd_status.c b/src/exchange-lib/testing_api_cmd_status.c index 77a5cbf9a..0c54ab704 100644 --- a/src/exchange-lib/testing_api_cmd_status.c +++ b/src/exchange-lib/testing_api_cmd_status.c @@ -109,7 +109,8 @@ reserve_status_cb if (0 != TALER_amount_cmp (&eb, balance)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Unexpected amount in reserve\n"); + "Unexpected amount in reserve: %s\n", + TALER_amount_to_string (balance)); TALER_TESTING_interpreter_fail (ss->is); return; } @@ -167,6 +168,8 @@ status_run (void *cls, return; } + /* NOTE: the following line might generate a ERROR log + * statements, but it can be ignored. */ if (GNUNET_OK == TALER_TESTING_get_trait_reserve_priv (create_reserve, 0,