aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-13 18:16:01 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-13 18:16:01 +0100
commit4d6ef1da29e5c1bf4c2216d9fe0c14dcab0f04cd (patch)
tree8141db7f726c59d21a81fe37846970237a75d892 /src/lib
parent258ed8617bdcad9f1c278a5fdcff97bcf2e29e54 (diff)
eliminate libtalerwire
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Makefile.am1
-rw-r--r--src/lib/exchange_api_wire.c2
-rw-r--r--src/lib/testing_api_cmd_wire.c2
-rw-r--r--src/lib/testing_api_helpers_bank.c33
-rw-r--r--src/lib/testing_api_helpers_exchange.c4
5 files changed, 27 insertions, 15 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 0325df009..9b76073f0 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -133,7 +133,6 @@ libtalertesting_la_SOURCES = \
testing_api_trait_wtid.c
libtalertesting_la_LIBADD = \
libtalerexchange.la \
- $(top_builddir)/src/wire/libtalerwire.la \
$(top_builddir)/src/json/libtalerjson.la \
$(top_builddir)/src/util/libtalerutil.la \
$(top_builddir)/src/bank-lib/libtalerbank.la \
diff --git a/src/lib/exchange_api_wire.c b/src/lib/exchange_api_wire.c
index 787797abe..aff933ba5 100644
--- a/src/lib/exchange_api_wire.c
+++ b/src/lib/exchange_api_wire.c
@@ -301,7 +301,7 @@ handle_wire_finished (void *cls,
ec = TALER_EC_SERVER_JSON_INVALID;
break;
}
- if (NULL == (method = TALER_WIRE_payto_get_method (wa->url)))
+ if (NULL == (method = TALER_payto_get_method (wa->url)))
{
/* bogus reply */
GNUNET_break_op (0);
diff --git a/src/lib/testing_api_cmd_wire.c b/src/lib/testing_api_cmd_wire.c
index 950ed62f7..387cda5dc 100644
--- a/src/lib/testing_api_cmd_wire.c
+++ b/src/lib/testing_api_cmd_wire.c
@@ -109,7 +109,7 @@ wire_cb (void *cls,
{
char *method;
- method = TALER_WIRE_payto_get_method (accounts[i].url);
+ method = TALER_payto_get_method (accounts[i].url);
if (0 == strcmp (ws->expected_method,
method))
{
diff --git a/src/lib/testing_api_helpers_bank.c b/src/lib/testing_api_helpers_bank.c
index 52227f7b7..1f0617992 100644
--- a/src/lib/testing_api_helpers_bank.c
+++ b/src/lib/testing_api_helpers_bank.c
@@ -17,15 +17,17 @@
<http://www.gnu.org/licenses/>
*/
/**
- * @file bank-lib/testing_api_helpers.c
- * @brief convenience functions for bank-lib tests.
+ * @file lib/testing_api_helpers_bank.c
+ * @brief convenience functions for bank tests.
* @author Marcello Stanisci
+ * @author Christian Grothoff
*/
#include "platform.h"
#include <gnunet/gnunet_util_lib.h>
#include "taler_testing_lib.h"
#include "taler_fakebank_lib.h"
+#define EXCHANGE_ACCOUNT_NAME "2"
#define BANK_FAIL() \
do {GNUNET_break (0); return NULL; } while (0)
@@ -332,14 +334,23 @@ TALER_TESTING_prepare_bank (const char *config_filename,
return GNUNET_SYSERR;
}
GNUNET_OS_process_destroy (dbreset_proc);
-
+ if (GNUNET_OK !=
+ TALER_BANK_auth_parse_cfg (cfg,
+ "account-" EXCHANGE_ACCOUNT_NAME,
+ &bc->exchange_auth))
+ {
+ GNUNET_break (0);
+ return GNUNET_SYSERR;
+ }
GNUNET_asprintf (&bc->bank_url,
"http://localhost:%llu/",
port);
- // FIXME: initialize rest of 'bc':
- bc->exchange_account_url = NULL; // FIXME
- bc->exchange_auth; // FIXME
- bc->exchange_payto = TALER_TESTING_make_xtalerbank_payto (bc->bank_url, "2");
+ GNUNET_asprintf (&bc->exchange_account_url,
+ "%s%s",
+ bc->bank_url,
+ EXCHANGE_ACCOUNT_NAME);
+ bc->exchange_payto = TALER_TESTING_make_xtalerbank_payto (bc->bank_url,
+ EXCHANGE_ACCOUNT_NAME);
bc->user42_payto = TALER_TESTING_make_xtalerbank_payto (bc->bank_url, "42");
bc->user43_payto = TALER_TESTING_make_xtalerbank_payto (bc->bank_url, "43");
return GNUNET_OK;
@@ -412,9 +423,11 @@ TALER_TESTING_prepare_fakebank (const char *config_filename,
return GNUNET_SYSERR;
}
bc->bank_url = fakebank_url;
- // FIXME: initialize rest of 'bc':
- bc->exchange_account_url = NULL; // FIXME
- bc->exchange_auth; // FIXME
+ GNUNET_asprintf (&bc->exchange_account_url,
+ "%s%s",
+ bc->bank_url,
+ EXCHANGE_ACCOUNT_NAME);
+ bc->exchange_auth.method = TALER_BANK_AUTH_NONE;
bc->exchange_payto = TALER_TESTING_make_xtalerbank_payto (bc->bank_url, "2");
bc->user42_payto = TALER_TESTING_make_xtalerbank_payto (bc->bank_url, "42");
bc->user43_payto = TALER_TESTING_make_xtalerbank_payto (bc->bank_url, "43");
diff --git a/src/lib/testing_api_helpers_exchange.c b/src/lib/testing_api_helpers_exchange.c
index 1fed38d1b..8f7c75035 100644
--- a/src/lib/testing_api_helpers_exchange.c
+++ b/src/lib/testing_api_helpers_exchange.c
@@ -18,7 +18,7 @@
*/
/**
- * @file exchange-lib/testing_api_helpers.c
+ * @file lib/testing_api_helpers_exchange.c
* @brief helper functions
* @author Christian Grothoff
* @author Marcello Stanisci
@@ -958,4 +958,4 @@ TALER_TESTING_url_port_free (const char *url)
}
-/* end of testing_api_helpers.c */
+/* end of testing_api_helpers_exchange.c */