diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-01-17 03:13:50 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-01-17 03:13:58 +0100 |
commit | 734fd8cc7d3fc71418aafedf9b920345b51b0b53 (patch) | |
tree | d48edd3ba25e7ae12f89461f832f7acdf973467f /src | |
parent | 4b16198b43ccb63a7efc2c170622a69759f8ed8f (diff) |
test_bank_api_with_fakebank passes again
Diffstat (limited to 'src')
-rw-r--r-- | src/bank-lib/fakebank.c | 34 | ||||
-rw-r--r-- | src/lib/test_bank_api.conf | 6 | ||||
-rw-r--r-- | src/lib/testing_api_cmd_bank_history_credit.c | 6 |
3 files changed, 33 insertions, 13 deletions
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c index fbd554aef..758c44cfc 100644 --- a/src/bank-lib/fakebank.c +++ b/src/bank-lib/fakebank.c @@ -950,10 +950,19 @@ handle_debit_history (struct TALER_FAKEBANK_Handle *h, char *credit_payto; char *debit_payto; - credit_payto = TALER_payto_xtalerbank_make (h->my_baseurl, - pos->credit_account); - debit_payto = TALER_payto_xtalerbank_make (h->my_baseurl, - pos->debit_account); + GNUNET_asprintf (&credit_payto, + "payto://x-taler-bank/localhost/%s", + pos->credit_account); + + GNUNET_asprintf (&debit_payto, + "payto://x-taler-bank/localhost/%s", + pos->debit_account); + + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "made credit_payto (%s) from credit_account (%s) within fakebank\n", + credit_payto, + pos->credit_account); + trans = json_pack ("{s:I, s:o, s:o, s:s, s:s, s:s, s:o}", "row_id", (json_int_t) pos->row_id, @@ -1070,10 +1079,19 @@ handle_credit_history (struct TALER_FAKEBANK_Handle *h, char *credit_payto; char *debit_payto; - credit_payto = TALER_payto_xtalerbank_make (h->my_baseurl, - pos->credit_account); - debit_payto = TALER_payto_xtalerbank_make (h->my_baseurl, - pos->debit_account); + GNUNET_asprintf (&credit_payto, + "payto://x-taler-bank/localhost/%s", + pos->credit_account); + + GNUNET_asprintf (&debit_payto, + "payto://x-taler-bank/localhost/%s", + pos->debit_account); + + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "made credit_payto (%s) from credit_account (%s) within fakebank\n", + credit_payto, + pos->credit_account); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Returning transaction %s->%s (%s) at %llu\n", pos->debit_account, diff --git a/src/lib/test_bank_api.conf b/src/lib/test_bank_api.conf index 97fe09c98..c5d55fa3e 100644 --- a/src/lib/test_bank_api.conf +++ b/src/lib/test_bank_api.conf @@ -2,13 +2,9 @@ currency = KUDOS [account-2] -URL = payto://x-taler-bank/localhost:8081/2 -FAKEBANK_PORT = 8081 +URL = payto://x-taler-bank/localhost/2 [bank] SERVE = http HTTP_PORT = 8081 DATABASE = postgres:///talercheck - -[exchange-wire-test] -bank_url = http://localhost:8081/ diff --git a/src/lib/testing_api_cmd_bank_history_credit.c b/src/lib/testing_api_cmd_bank_history_credit.c index fe55fbce6..ab2d0674b 100644 --- a/src/lib/testing_api_cmd_bank_history_credit.c +++ b/src/lib/testing_api_cmd_bank_history_credit.c @@ -371,6 +371,12 @@ check_result (struct TALER_TESTING_Interpreter *is, details->debit_account_url)) ) { GNUNET_break (0); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "expected debit_account_url: %s\n", + details->debit_account_url); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "actual debit_account_url: %s\n", + h[off].details.debit_account_url); print_expected (h, total, off); |