aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_bank_check_empty.c
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-06-10 11:07:06 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-06-10 11:07:06 +0200
commit70bfe0ed1b9a5dbb6cc487465ef3c3df4cdb0436 (patch)
tree5f32b30f5b58dfc502c273bebecffbcb79fc3c4b /src/testing/testing_api_cmd_bank_check_empty.c
parent46188ae07e97d12b73269167459707844b3c2486 (diff)
parentd8f8c550bd7ad85f9da9bc5edba619e533eabcc8 (diff)
downloadexchange-70bfe0ed1b9a5dbb6cc487465ef3c3df4cdb0436.tar.xz
Merge branch 'master' into age-withdraw
Diffstat (limited to 'src/testing/testing_api_cmd_bank_check_empty.c')
-rw-r--r--src/testing/testing_api_cmd_bank_check_empty.c26
1 files changed, 25 insertions, 1 deletions
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);