From a2dde02b64a8ee75c9243632eb45a6ceb9b62dd5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 7 Jun 2023 23:11:05 +0200 Subject: major libtalertesting API refactoring, including no longer having taler-specific logic in the test engine core --- src/testing/testing_api_cmd_bank_check_empty.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/testing/testing_api_cmd_bank_check_empty.c') diff --git a/src/testing/testing_api_cmd_bank_check_empty.c b/src/testing/testing_api_cmd_bank_check_empty.c index 84976b0b5..60f00fbb4 100644 --- a/src/testing/testing_api_cmd_bank_check_empty.c +++ b/src/testing/testing_api_cmd_bank_check_empty.c @@ -58,9 +58,33 @@ check_bank_empty_run (void *cls, const struct TALER_TESTING_Command *cmd, struct TALER_TESTING_Interpreter *is) { + struct TALER_FAKEBANK_Handle *fakebank; + (void) cls; (void) cmd; - if (GNUNET_OK != TALER_FAKEBANK_check_empty (is->fakebank)) + { + const struct TALER_TESTING_Command *fakebank_cmd; + + fakebank_cmd + = TALER_TESTING_interpreter_get_command (is, + "fakebank"); + if (NULL == fakebank_cmd) + { + GNUNET_break (0); + TALER_TESTING_interpreter_fail (is); + return; + } + if (GNUNET_OK != + TALER_TESTING_get_trait_fakebank (fakebank_cmd, + &fakebank)) + { + GNUNET_break (0); + TALER_TESTING_interpreter_fail (is); + return; + } + } + if (GNUNET_OK != + TALER_FAKEBANK_check_empty (fakebank)) { GNUNET_break (0); TALER_TESTING_interpreter_fail (is); -- cgit v1.2.3