summaryrefslogtreecommitdiff
path: root/src/merchant-tools
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2020-01-13 11:35:07 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2020-01-13 11:35:07 +0100
commite54402d392c25aa0476308d51bcc75ce84178dc3 (patch)
tree1b4b0e48876099f5959900e51133c4c76e12f022 /src/merchant-tools
parentadfd806648d1a58e7ab67f7988f6a4e98500a8a3 (diff)
downloadmerchant-e54402d392c25aa0476308d51bcc75ce84178dc3.tar.gz
merchant-e54402d392c25aa0476308d51bcc75ce84178dc3.tar.bz2
merchant-e54402d392c25aa0476308d51bcc75ce84178dc3.zip
fix compilation after exchange refactor
Diffstat (limited to 'src/merchant-tools')
-rw-r--r--src/merchant-tools/Makefile.am1
-rw-r--r--src/merchant-tools/taler-merchant-benchmark.c56
2 files changed, 38 insertions, 19 deletions
diff --git a/src/merchant-tools/Makefile.am b/src/merchant-tools/Makefile.am
index bf52f500..00e3f883 100644
--- a/src/merchant-tools/Makefile.am
+++ b/src/merchant-tools/Makefile.am
@@ -26,6 +26,7 @@ taler_merchant_benchmark_LDADD = \
-ltalertesting \
-ltalerfakebank \
-ltalerbank \
+ -ltalerwire \
-ltalerbanktesting \
-ltalerexchange \
-ltalerjson \
diff --git a/src/merchant-tools/taler-merchant-benchmark.c b/src/merchant-tools/taler-merchant-benchmark.c
index 49c3cdd7..d9c6dcc4 100644
--- a/src/merchant-tools/taler-merchant-benchmark.c
+++ b/src/merchant-tools/taler-merchant-benchmark.c
@@ -33,7 +33,6 @@
#include <taler/taler_bank_service.h>
#include <taler/taler_fakebank_lib.h>
#include <taler/taler_testing_lib.h>
-#include <taler/taler_testing_bank_lib.h>
#include <taler/taler_error_codes.h>
#include "taler_merchant_testing_lib.h"
@@ -55,26 +54,16 @@ enum PaymentGeneratorError
/* Hard-coded params. Note, the bank is expected to
* have the Tor user with account number 3 and password 'x'.
- *
- * This is not a problem _so far_, as the fakebank mocks logins,
- * and the Python bank makes that account by default. */
-#define USER_ACCOUNT_NO 3
+ */
+#define PAYER_URL "FIXME/3"
#define EXCHANGE_ACCOUNT_NO 2
#define USER_LOGIN_NAME "Tor"
#define USER_LOGIN_PASS "x"
#define EXCHANGE_URL "http://example.com/"
-
#define FIRST_INSTRUCTION -1
#define TRACKS_INSTRUCTION 9
#define TWOCOINS_INSTRUCTION 5
-#define CMD_TRANSFER_TO_EXCHANGE(label,amount) \
- TALER_TESTING_cmd_fakebank_transfer (label, amount, \
- bank_url, USER_ACCOUNT_NO, \
- EXCHANGE_ACCOUNT_NO, \
- USER_LOGIN_NAME, USER_LOGIN_PASS, \
- EXCHANGE_URL)
-
/**
* Help string shown if NO subcommand is given on command line.
*/
@@ -180,6 +169,14 @@ static char *merchant_url;
static char *currency;
/**
+ * Authentication data to use. FIXME: init !
+ */
+static struct TALER_BANK_AuthenticationData auth;
+
+static char *exchange_payto;
+static struct TALER_WireTransferIdentifierRawP wtid;
+
+/**
* Convenience macros to allocate all the currency-dependant
* strings; note that the argument list of the macro is ignored.
* It is kept as a way to make the macro more auto-descriptive
@@ -336,9 +333,14 @@ run (void *cls,
struct TALER_TESTING_Command ordinary_commands[] = {
- CMD_TRANSFER_TO_EXCHANGE
+ TALER_TESTING_cmd_transfer
("create-reserve-1",
- CURRENCY_10_02),
+ CURRENCY_10_02,
+ PAYER_URL, // bank base URL + path to the payer account.
+ &auth,
+ exchange_payto,
+ &wtid,
+ EXCHANGE_URL),
TALER_TESTING_cmd_exec_wirewatch
("wirewatch-1",
@@ -425,9 +427,14 @@ run (void *cls,
struct TALER_TESTING_Command corner_commands[] = {
- CMD_TRANSFER_TO_EXCHANGE
+ TALER_TESTING_cmd_transfer
("create-reserve-1",
- CURRENCY_5_01),
+ CURRENCY_5_01,
+ PAYER_URL,
+ &auth,
+ exchange_payto,
+ &wtid,
+ EXCHANGE_URL),
TALER_TESTING_cmd_exec_wirewatch
("wirewatch-1",
@@ -460,9 +467,14 @@ run (void *cls,
FIRST_INSTRUCTION,
&unaggregated_number),
- CMD_TRANSFER_TO_EXCHANGE
+ TALER_TESTING_cmd_transfer
("create-reserve-2",
- CURRENCY_10_02),
+ CURRENCY_10_02,
+ PAYER_URL,
+ &auth,
+ exchange_payto,
+ &wtid,
+ EXCHANGE_URL),
TALER_TESTING_cmd_exec_wirewatch
("wirewatch-2",
@@ -785,6 +797,12 @@ main (int argc,
return FAILED_TO_LAUNCH_BANK;
}
+ /**
+ * FIXME: Need to retrieve the bank base URL!
+ */
+ exchange_payto = TALER_TESTING_make_xtalerbank_payto ("FIXME-BANK-HOSTNAME:PORT",
+ "/2");
+
result = TALER_TESTING_setup_with_exchange
(run,
NULL,