summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_bank_admin_check.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_cmd_bank_admin_check.c')
-rw-r--r--src/testing/testing_api_cmd_bank_admin_check.c29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/testing/testing_api_cmd_bank_admin_check.c b/src/testing/testing_api_cmd_bank_admin_check.c
index 21a230834..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);
@@ -102,7 +124,6 @@ check_bank_admin_transfer_run (void *cls,
TALER_TESTING_interpreter_fail (is);
return;
}
- TALER_LOG_INFO ("Deposit reference NOT given\n");
debit_payto = bcs->debit_payto;
credit_payto = bcs->credit_payto;
if (GNUNET_OK !=
@@ -110,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;
}
@@ -123,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,