aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_bank_admin_check.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_admin_check.c
parent46188ae07e97d12b73269167459707844b3c2486 (diff)
parentd8f8c550bd7ad85f9da9bc5edba619e533eabcc8 (diff)
downloadexchange-70bfe0ed1b9a5dbb6cc487465ef3c3df4cdb0436.tar.xz
Merge branch 'master' into age-withdraw
Diffstat (limited to 'src/testing/testing_api_cmd_bank_admin_check.c')
-rw-r--r--src/testing/testing_api_cmd_bank_admin_check.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/testing/testing_api_cmd_bank_admin_check.c b/src/testing/testing_api_cmd_bank_admin_check.c
index c49e49d8d..6406fe2c2 100644
--- a/src/testing/testing_api_cmd_bank_admin_check.c
+++ b/src/testing/testing_api_cmd_bank_admin_check.c
@@ -82,8 +82,30 @@ check_bank_admin_transfer_run (void *cls,
const char *credit_payto;
const struct TALER_ReservePublicKeyP *reserve_pub;
const struct TALER_TESTING_Command *cmd_ref;
+ struct TALER_FAKEBANK_Handle *fakebank;
(void) cmd;
+ {
+ 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;
+ }
+ }
cmd_ref
= TALER_TESTING_interpreter_lookup_command (is,
bcs->reserve_pub_ref);
@@ -109,9 +131,9 @@ check_bank_admin_transfer_run (void *cls,
&amount))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Failed to parse amount `%s' at %u\n",
+ "Failed to parse amount `%s' at %s\n",
bcs->amount,
- is->ip);
+ TALER_TESTING_interpreter_get_current_label (is));
TALER_TESTING_interpreter_fail (is);
return;
}
@@ -122,7 +144,7 @@ check_bank_admin_transfer_run (void *cls,
debit_payto,
debit_account);
if (GNUNET_OK !=
- TALER_FAKEBANK_check_credit (is->fakebank,
+ TALER_FAKEBANK_check_credit (fakebank,
&amount,
debit_account,
credit_account,