gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: test_bank_api_with_fakebank pass


From: gnunet
Subject: [taler-exchange] branch master updated: test_bank_api_with_fakebank passes again
Date: Fri, 17 Jan 2020 03:14:52 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 734fd8cc test_bank_api_with_fakebank passes again
734fd8cc is described below

commit 734fd8cc7d3fc71418aafedf9b920345b51b0b53
Author: Florian Dold <address@hidden>
AuthorDate: Fri Jan 17 03:13:50 2020 +0100

    test_bank_api_with_fakebank passes again
---
 src/bank-lib/fakebank.c                       | 34 ++++++++++++++++++++-------
 src/lib/test_bank_api.conf                    |  6 +----
 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 fbd554ae..758c44cf 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 97fe09c9..c5d55fa3 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 fe55fbce..ab2d0674 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);

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]