From 2ee33e3cbcc5432d9a017e8484a882635de6d6d5 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 11 Jan 2020 23:06:10 +0100 Subject: remove exchange-url argument from /admin/add/incoming --- src/bank-lib/test_bank_api.c | 47 +++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 16 deletions(-) (limited to 'src/bank-lib/test_bank_api.c') diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c index 087e44848..d577bff95 100644 --- a/src/bank-lib/test_bank_api.c +++ b/src/bank-lib/test_bank_api.c @@ -42,8 +42,19 @@ /** * Fakebank URL. */ + static char *bank_url; +/** + * Account URL. + */ +static char *account_url; + +/** + * payto://-URL of another account. + */ +static char *payto_url; + /** * Handle to the Py-bank daemon. */ @@ -85,25 +96,18 @@ static void run (void *cls, struct TALER_TESTING_Interpreter *is) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Bank serves at `%s'\n", - bank_url); - extern struct TALER_BANK_AuthenticationData AUTHS[]; struct TALER_TESTING_Command commands[] = { - TALER_TESTING_cmd_bank_history ("history-0", - bank_url, - TALER_TESTING_BANK_ACCOUNT_NUMBER, - TALER_BANK_DIRECTION_BOTH, - GNUNET_YES, + TALER_TESTING_cmd_bank_credits ("history-0", + account_url, NULL, 1), - /* WARNING: old API has expected http response code among - * the parameters, although it was always set as '200 OK' */ - TRANSFER ("debit-1", - "KUDOS:5.01", - TALER_TESTING_EXCHANGE_ACCOUNT_NUMBER, - TALER_TESTING_BANK_ACCOUNT_NUMBER, - "subject 1"), + TALER_TESTING_cmd_fakebank_transfer ("debit-1", + "KUDOS:5.01", + account_url, + payto_url, + NULL, + NULL, + "subject 1"), TALER_TESTING_cmd_bank_history ("history-1c", bank_url, TALER_TESTING_BANK_ACCOUNT_NUMBER, @@ -168,6 +172,17 @@ run (void *cls, TALER_TESTING_cmd_end () }; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Bank serves at `%s'\n", + bank_url); + GNUNET_asprintf (&account_url, + "%s/%s", + base_url, + "alice"); + GNUNET_asprintf (&payto_url, + "payto://x-taler-bank/%s/%s", + base_url, + "bob"); if (GNUNET_YES == WITH_FAKEBANK) TALER_TESTING_run_with_fakebank (is, commands, -- cgit v1.2.3