diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2018-02-28 16:59:39 +0100 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2018-02-28 16:59:39 +0100 |
commit | a360d9c6a0538f8d4806745f74cb0eae75e91b69 (patch) | |
tree | fe92f8dec937eadb8a3cbf717365f0b13e5e4635 /src/exchange-lib/testing_api_loop.c | |
parent | f1f53770035f432fffce44b44724f63ffbe7c58f (diff) | |
download | exchange-a360d9c6a0538f8d4806745f74cb0eae75e91b69.tar.gz exchange-a360d9c6a0538f8d4806745f74cb0eae75e91b69.tar.bz2 exchange-a360d9c6a0538f8d4806745f74cb0eae75e91b69.zip |
Test cases connect to the exchange via the base URL
they get from exchange/BASE_URL config value. This way, the
twister can be easily put in the middle by making it
listen on the same port specified after the : of the
exchange/BASE_URL.
Diffstat (limited to 'src/exchange-lib/testing_api_loop.c')
-rw-r--r-- | src/exchange-lib/testing_api_loop.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/exchange-lib/testing_api_loop.c b/src/exchange-lib/testing_api_loop.c index 78ae3611d..e179c209d 100644 --- a/src/exchange-lib/testing_api_loop.c +++ b/src/exchange-lib/testing_api_loop.c @@ -535,7 +535,6 @@ main_wrapper_exchange_connect (void *cls) struct TALER_TESTING_Interpreter *is = main_ctx->is; struct GNUNET_CONFIGURATION_Handle *cfg; char *exchange_url; - long long unsigned int exchange_port; cfg = GNUNET_CONFIGURATION_create (); if (GNUNET_OK != GNUNET_CONFIGURATION_load @@ -543,21 +542,17 @@ main_wrapper_exchange_connect (void *cls) return; if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_number (cfg, + GNUNET_CONFIGURATION_get_value_string (cfg, "exchange", - "PORT", - &exchange_port)) + "BASE_URL", + &exchange_url)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, "exchange", - "PORT"); + "BASE_URL"); GNUNET_CONFIGURATION_destroy (cfg); return; } - GNUNET_asprintf (&exchange_url, - "http://localhost:%llu/", - exchange_port); - GNUNET_assert ( NULL != (is->exchange = TALER_EXCHANGE_connect (is->ctx, exchange_url, |