summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-08-14 14:42:58 +0200
committerChristian Grothoff <christian@grothoff.org>2020-08-14 14:42:58 +0200
commitd8256207a12ba665fbd2a6fb1ea0dc942530d318 (patch)
tree3aaaa12a6f783943d0bc12173bbe1f0b9424aa27
parente8ea6bf1e7d9f22a964a9e7e13bc68debb0a7954 (diff)
downloadexchange-d8256207a12ba665fbd2a6fb1ea0dc942530d318.tar.gz
exchange-d8256207a12ba665fbd2a6fb1ea0dc942530d318.tar.bz2
exchange-d8256207a12ba665fbd2a6fb1ea0dc942530d318.zip
fix #6480
-rw-r--r--src/testing/test_bank_api_twisted.c9
-rw-r--r--src/testing/test_exchange_api_twisted.c24
2 files changed, 18 insertions, 15 deletions
diff --git a/src/testing/test_bank_api_twisted.c b/src/testing/test_bank_api_twisted.c
index b3e861e5..73e82bfc 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 1028fb20..446bdccc 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);