diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-06-07 23:11:05 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-06-07 23:11:05 +0200 |
commit | a2dde02b64a8ee75c9243632eb45a6ceb9b62dd5 (patch) | |
tree | 378cb6aefaf7f00894a7c8916fad9c3de84e31b4 /src/testing/testing_api_cmd_bank_admin_check.c | |
parent | 015b08b0489d72f3fda587eec900bc4193a6a57e (diff) | |
download | exchange-a2dde02b64a8ee75c9243632eb45a6ceb9b62dd5.tar.gz exchange-a2dde02b64a8ee75c9243632eb45a6ceb9b62dd5.tar.bz2 exchange-a2dde02b64a8ee75c9243632eb45a6ceb9b62dd5.zip |
major libtalertesting API refactoring, including no longer having taler-specific logic in the test engine core
Diffstat (limited to 'src/testing/testing_api_cmd_bank_admin_check.c')
-rw-r--r-- | src/testing/testing_api_cmd_bank_admin_check.c | 28 |
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, |