fix more FTBFS

This commit is contained in:
Christian Grothoff 2020-01-12 19:55:56 +01:00
parent 061eaac70f
commit 636c148c07
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 37 additions and 44 deletions

View File

@ -204,6 +204,7 @@ test_exchange_api_LDADD = \
$(LIBGCRYPT_LIBS) \ $(LIBGCRYPT_LIBS) \
$(top_builddir)/src/bank-lib/libtalerfakebank.la \ $(top_builddir)/src/bank-lib/libtalerfakebank.la \
$(top_builddir)/src/bank-lib/libtalerbank.la \ $(top_builddir)/src/bank-lib/libtalerbank.la \
$(top_builddir)/src/bank-lib/libtalerbanktesting.la \
$(top_builddir)/src/json/libtalerjson.la \ $(top_builddir)/src/json/libtalerjson.la \
$(top_builddir)/src/util/libtalerutil.la \ $(top_builddir)/src/util/libtalerutil.la \
-lgnunetcurl \ -lgnunetcurl \

View File

@ -82,6 +82,16 @@ static char *exchange_account_url; // FIXME: initialize!
*/ */
static char *user_account_payto; // FIXME: initialize! static char *user_account_payto; // FIXME: initialize!
/**
* Payto URL of the user's account.
*/
static char *user2_account_payto; // FIXME: initialize! (43!)
/**
* Payto URL of the exchange's account.
*/
static char *exchange_account_payto; // FIXME: initialize!
/** /**
* Credentials for talking to the bank. * Credentials for talking to the bank.
*/ */
@ -381,23 +391,23 @@ run (void *cls,
*/ */
TALER_TESTING_cmd_check_bank_transfer TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-499c", exchange_url, ("check_bank_transfer-499c", exchange_url,
"EUR:4.98", 2, 42), "EUR:4.98", exchange_account_payto, user_account_payto),
TALER_TESTING_cmd_check_bank_transfer TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-99c1", exchange_url, ("check_bank_transfer-99c1", exchange_url,
"EUR:0.98", 2, 42), "EUR:0.98", exchange_account_payto, user_account_payto),
TALER_TESTING_cmd_check_bank_transfer TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-99c2", exchange_url, ("check_bank_transfer-99c2", exchange_url,
"EUR:0.98", 2, 42), "EUR:0.98", exchange_account_payto, user_account_payto),
TALER_TESTING_cmd_check_bank_transfer TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-99c", exchange_url, ("check_bank_transfer-99c", exchange_url,
"EUR:0.08", 2, 43), "EUR:0.08", exchange_account_payto, user2_account_payto),
TALER_TESTING_cmd_check_bank_transfer TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-aai-1", exchange_url, ("check_bank_transfer-aai-1", exchange_url,
"EUR:5.01", 42, 2), "EUR:5.01", user_account_payto, exchange_account_payto),
/** /**
* NOTE: the old test-suite had this "check bank transfer" * NOTE: the old test-suite had this "check bank transfer"
@ -405,7 +415,7 @@ run (void *cls,
*/ */
TALER_TESTING_cmd_check_bank_transfer TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-aai-2", exchange_url, ("check_bank_transfer-aai-2", exchange_url,
"EUR:5.01", 42, 2), "EUR:5.01", user_account_payto, exchange_account_payto),
TALER_TESTING_cmd_check_bank_empty ("check_bank_empty"), TALER_TESTING_cmd_check_bank_empty ("check_bank_empty"),
@ -446,8 +456,7 @@ run (void *cls,
("check_bank_transfer-unaggregated", ("check_bank_transfer-unaggregated",
exchange_url, exchange_url,
"EUR:5.01", "EUR:5.01",
42, user_account_payto, exchange_account_payto),
2),
TALER_TESTING_cmd_withdraw_amount TALER_TESTING_cmd_withdraw_amount
("withdraw-coin-unaggregated", ("withdraw-coin-unaggregated",
@ -525,7 +534,7 @@ run (void *cls,
* other transfers around. * other transfers around.
*/TALER_TESTING_cmd_check_bank_transfer */TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-pre-refund", exchange_url, ("check_bank_transfer-pre-refund", exchange_url,
"EUR:5.01", 42, 2), "EUR:5.01", user_account_payto, exchange_account_payto),
TALER_TESTING_cmd_check_bank_empty TALER_TESTING_cmd_check_bank_empty
("check_bank_transfer-pre-refund"), ("check_bank_transfer-pre-refund"),
@ -567,7 +576,7 @@ run (void *cls,
*/ */
TALER_TESTING_cmd_check_bank_transfer TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-pre-refund", exchange_url, ("check_bank_transfer-pre-refund", exchange_url,
"EUR:4.97", 2, 42), "EUR:4.97", exchange_account_payto, user_account_payto),
/** /**
* Run failing refund, as past deadline & aggregation. * Run failing refund, as past deadline & aggregation.
@ -595,7 +604,7 @@ run (void *cls,
TALER_TESTING_cmd_check_bank_transfer TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-aai-3b", exchange_url, ("check_bank_transfer-aai-3b", exchange_url,
"EUR:5.01", 42, 2), "EUR:5.01", user_account_payto, exchange_account_payto),
TALER_TESTING_cmd_deposit TALER_TESTING_cmd_deposit
@ -716,15 +725,15 @@ run (void *cls,
("check_bank_short-lived_transfer", ("check_bank_short-lived_transfer",
exchange_url, exchange_url,
"EUR:5.01", "EUR:5.01",
42, user_account_payto,
2), exchange_account_payto),
TALER_TESTING_cmd_check_bank_transfer TALER_TESTING_cmd_check_bank_transfer
("check_bank_short-lived_reimburse", ("check_bank_short-lived_reimburse",
exchange_url, exchange_url,
"EUR:5", "EUR:5",
2, exchange_account_payto,
42), user_account_payto),
/** /**
* Fill reserve with EUR:2.02, as withdraw fee is 1 ct per * Fill reserve with EUR:2.02, as withdraw fee is 1 ct per
@ -814,84 +823,67 @@ run (void *cls,
/* check that we are empty before the rejection test */ /* check that we are empty before the rejection test */
TALER_TESTING_cmd_check_bank_transfer TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-pr1", exchange_url, ("check_bank_transfer-pr1", exchange_url,
"EUR:5.01", 42, 2), "EUR:5.01", user_account_payto, exchange_account_payto),
TALER_TESTING_cmd_check_bank_transfer TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-pr2", exchange_url, ("check_bank_transfer-pr2", exchange_url,
"EUR:2.02", 42, 2), "EUR:2.02", user_account_payto, exchange_account_payto),
TALER_TESTING_cmd_check_bank_transfer TALER_TESTING_cmd_check_bank_transfer
("check_bank_transfer-pr3", exchange_url, ("check_bank_transfer-pr3", exchange_url,
"EUR:1.01", 42, 2), "EUR:1.01", user_account_payto, exchange_account_payto),
TALER_TESTING_cmd_check_bank_empty TALER_TESTING_cmd_check_bank_empty
("check-empty-again"), ("check-empty-again"),
TALER_TESTING_cmd_end () TALER_TESTING_cmd_end ()
}; };
#define RESERVE_OPEN_CLOSE_CHUNK 4 #define RESERVE_OPEN_CLOSE_CHUNK 4
#define RESERVE_OPEN_CLOSE_ITERATIONS 3 #define RESERVE_OPEN_CLOSE_ITERATIONS 3
#define CONSTANT_KEY \
"09QGYPEKNHBACK135BNXZFHA0YTQXT1KJDRVXF4J822G99AYNQ8G"
struct TALER_TESTING_Command reserve_open_close
[(RESERVE_OPEN_CLOSE_ITERATIONS
* RESERVE_OPEN_CLOSE_CHUNK) + 1];
struct TALER_TESTING_Command reserve_open_close[(RESERVE_OPEN_CLOSE_ITERATIONS
* RESERVE_OPEN_CLOSE_CHUNK)
+ 1];
for (unsigned int i = 0; for (unsigned int i = 0;
i < RESERVE_OPEN_CLOSE_ITERATIONS; i < RESERVE_OPEN_CLOSE_ITERATIONS;
i++) i++)
{ {
reserve_open_close[i * RESERVE_OPEN_CLOSE_CHUNK] reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 0]
= CMD_TRANSFER_TO_EXCHANGE_SUBJECT = CMD_TRANSFER_TO_EXCHANGE
("reserve-open-close-key", ("reserve-open-close-key",
"EUR:20", "EUR:20");
CONSTANT_KEY);
reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 1] reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 1]
= TALER_TESTING_cmd_exec_wirewatch = TALER_TESTING_cmd_exec_wirewatch
("reserve-open-close-wirewatch", ("reserve-open-close-wirewatch",
CONFIG_FILE_EXPIRE_RESERVE_NOW); CONFIG_FILE_EXPIRE_RESERVE_NOW);
reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 2] reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 2]
= TALER_TESTING_cmd_exec_aggregator = TALER_TESTING_cmd_exec_aggregator
("reserve-open-close-aggregation", ("reserve-open-close-aggregation",
CONFIG_FILE_EXPIRE_RESERVE_NOW); CONFIG_FILE_EXPIRE_RESERVE_NOW);
reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 3] reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 3]
= TALER_TESTING_cmd_status ("reserve-open-close-status", = TALER_TESTING_cmd_status ("reserve-open-close-status",
"reserve-open-close-key", "reserve-open-close-key",
"EUR:0", "EUR:0",
MHD_HTTP_OK); MHD_HTTP_OK);
} }
reserve_open_close reserve_open_close[RESERVE_OPEN_CLOSE_ITERATIONS * RESERVE_OPEN_CLOSE_CHUNK]
[RESERVE_OPEN_CLOSE_ITERATIONS * RESERVE_OPEN_CLOSE_CHUNK]
= TALER_TESTING_cmd_end (); = TALER_TESTING_cmd_end ();
struct TALER_TESTING_Command commands[] = { struct TALER_TESTING_Command commands[] = {
TALER_TESTING_cmd_batch ("wire", TALER_TESTING_cmd_batch ("wire",
wire), wire),
TALER_TESTING_cmd_batch ("withdraw", TALER_TESTING_cmd_batch ("withdraw",
withdraw), withdraw),
TALER_TESTING_cmd_batch ("spend", TALER_TESTING_cmd_batch ("spend",
spend), spend),
TALER_TESTING_cmd_batch ("refresh", TALER_TESTING_cmd_batch ("refresh",
refresh), refresh),
TALER_TESTING_cmd_batch ("track", TALER_TESTING_cmd_batch ("track",
track), track),
TALER_TESTING_cmd_batch ("unaggregation", TALER_TESTING_cmd_batch ("unaggregation",
unaggregation), unaggregation),
TALER_TESTING_cmd_batch ("refund", TALER_TESTING_cmd_batch ("refund",
refund), refund),
TALER_TESTING_cmd_batch ("payback", TALER_TESTING_cmd_batch ("payback",
payback), payback),
/* Fix #5462. */
TALER_TESTING_cmd_batch ("reserve-open-close", TALER_TESTING_cmd_batch ("reserve-open-close",
reserve_open_close), reserve_open_close),
/** /**