From d8256207a12ba665fbd2a6fb1ea0dc942530d318 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 14 Aug 2020 14:42:58 +0200 Subject: fix #6480 --- src/testing/test_bank_api_twisted.c | 9 +++++++-- src/testing/test_exchange_api_twisted.c | 24 +++++++++++------------- 2 files changed, 18 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/testing/test_bank_api_twisted.c b/src/testing/test_bank_api_twisted.c index b3e861e51..73e82bfc7 100644 --- a/src/testing/test_bank_api_twisted.c +++ b/src/testing/test_bank_api_twisted.c @@ -91,7 +91,12 @@ run (void *cls, memcpy (&exchange_auth_twisted, &bc.exchange_auth, sizeof (struct TALER_BANK_AuthenticationData)); - exchange_auth_twisted.wire_gateway_url = "http://localhost:8888/2/"; + if (with_fakebank) + exchange_auth_twisted.wire_gateway_url = + "http://localhost:8888/2/"; + else + exchange_auth_twisted.wire_gateway_url = + "http://localhost:8888/taler-wire-gateway/Exchange/"; struct TALER_TESTING_Command commands[] = { /* Test retrying transfer after failure. */ @@ -156,7 +161,7 @@ int main (int argc, char *const *argv) { - unsigned int ret; + int ret; const char *cfgfilename; /* These environment variables get in the way... */ diff --git a/src/testing/test_exchange_api_twisted.c b/src/testing/test_exchange_api_twisted.c index 1028fb209..446bdccc4 100644 --- a/src/testing/test_exchange_api_twisted.c +++ b/src/testing/test_exchange_api_twisted.c @@ -70,9 +70,10 @@ static struct GNUNET_OS_Process *twisterd; * @param label label to use for the command. */ static struct TALER_TESTING_Command -CMD_EXEC_WIREWATCH (char *label) +CMD_EXEC_WIREWATCH (const char *label) { - return TALER_TESTING_cmd_exec_wirewatch (label, CONFIG_FILE); + return TALER_TESTING_cmd_exec_wirewatch (label, + CONFIG_FILE); } @@ -85,7 +86,8 @@ CMD_EXEC_WIREWATCH (char *label) * @param url exchange_url */ static struct TALER_TESTING_Command -CMD_TRANSFER_TO_EXCHANGE (char *label, char *amount) +CMD_TRANSFER_TO_EXCHANGE (const char *label, + const char *amount) { return TALER_TESTING_cmd_admin_add_incoming (label, amount, @@ -258,7 +260,8 @@ run (void *cls, static void purge_process (struct GNUNET_OS_Process *process) { - GNUNET_OS_process_kill (process, SIGINT); + GNUNET_OS_process_kill (process, + SIGINT); GNUNET_OS_process_wait (process); GNUNET_OS_process_destroy (process); } @@ -268,25 +271,23 @@ int main (int argc, char *const *argv) { - unsigned int ret; + int ret; + /* These environment variables get in the way... */ unsetenv ("XDG_DATA_HOME"); unsetenv ("XDG_CONFIG_HOME"); GNUNET_log_setup ("test-exchange-api-twisted", - "DEBUG", NULL); - + "DEBUG", + NULL); if (GNUNET_OK != TALER_TESTING_prepare_fakebank (CONFIG_FILE, "exchange-account-2", &bc)) return 77; - if (NULL == (twister_url = TALER_TWISTER_prepare_twister (CONFIG_FILE))) return 77; - TALER_TESTING_cleanup_files (CONFIG_FILE); - switch (TALER_TESTING_prepare_exchange (CONFIG_FILE, GNUNET_YES, &ec)) @@ -296,12 +297,9 @@ main (int argc, return 1; case GNUNET_NO: return 77; - case GNUNET_OK: - if (NULL == (twisterd = TALER_TWISTER_run_twister (CONFIG_FILE))) return 77; - ret = TALER_TESTING_setup_with_exchange (&run, NULL, CONFIG_FILE); -- cgit v1.2.3