diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-01-17 18:09:33 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-01-17 18:09:41 +0100 |
commit | ac8bf9dd8c5ae0601686e3a677bcb244aeee6bcf (patch) | |
tree | d1e2e1958c69070e4d0a393bf7fe00dd5e588684 /src | |
parent | 3b0c26d1517706beb91e5d91c4a0b0f3dac33172 (diff) |
configs for twister
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/test_bank_api_twisted.c | 34 | ||||
-rw-r--r-- | src/lib/test_bank_api_twisted.conf | 39 | ||||
-rw-r--r-- | src/lib/test_exchange_api.conf | 18 | ||||
-rw-r--r-- | src/lib/test_exchange_api_twisted.conf | 82 |
4 files changed, 79 insertions, 94 deletions
diff --git a/src/lib/test_bank_api_twisted.c b/src/lib/test_bank_api_twisted.c index 264a1b721..3e52880ea 100644 --- a/src/lib/test_bank_api_twisted.c +++ b/src/lib/test_bank_api_twisted.c @@ -39,7 +39,12 @@ * Configuration file we use. One (big) configuration is used * for the various components for this test. */ -#define CONFIG_FILE "test_bank_api_twisted.conf" +#define CONFIG_FILE_FAKEBANK "test_bank_api_fakebank_twisted.conf" + +/** + * Separate config file for running with the pybank. + */ +#define CONFIG_FILE_PYBANK "test_bank_api_pybank_twisted.conf" /** * True when the test runs against Fakebank. @@ -87,7 +92,7 @@ run (void *cls, GNUNET_asprintf (&twisted_account_url, "%s%s/", twister_url, - "alice"); + "42"); struct TALER_TESTING_Command commands[] = { /** @@ -133,6 +138,7 @@ main (int argc, char *const *argv) { unsigned int ret; + const char *cfgfilename; /* These environment variables get in the way... */ unsetenv ("XDG_DATA_HOME"); @@ -140,27 +146,33 @@ main (int argc, GNUNET_log_setup ("test-bank-api-with-(fake)bank-twisted", "DEBUG", NULL); + + with_fakebank = TALER_TESTING_has_in_name (argv[0], + "_with_fakebank"); + + if (with_fakebank) + cfgfilename = CONFIG_FILE_FAKEBANK; + else + cfgfilename = CONFIG_FILE_PYBANK; + if (NULL == (twister_url = TALER_TESTING_prepare_twister - (CONFIG_FILE))) + (cfgfilename))) { GNUNET_break (0); return 77; } - if (NULL == (twisterd = TALER_TESTING_run_twister (CONFIG_FILE))) + if (NULL == (twisterd = TALER_TESTING_run_twister (cfgfilename))) { GNUNET_break (0); GNUNET_free (twister_url); return 77; } - with_fakebank = TALER_TESTING_has_in_name (argv[0], - "_with_fakebank"); - if (GNUNET_YES == with_fakebank) { TALER_LOG_DEBUG ("Running against the Fakebank.\n"); if (GNUNET_OK != - TALER_TESTING_prepare_fakebank (CONFIG_FILE, + TALER_TESTING_prepare_fakebank (cfgfilename, "account-1", &bc)) { @@ -173,7 +185,7 @@ main (int argc, { TALER_LOG_DEBUG ("Running against the Pybank.\n"); if (GNUNET_OK != - TALER_TESTING_prepare_bank (CONFIG_FILE, + TALER_TESTING_prepare_bank (cfgfilename, &bc)) { GNUNET_break (0); @@ -181,7 +193,7 @@ main (int argc, return 77; } - if (NULL == (bankd = TALER_TESTING_run_bank (CONFIG_FILE, + if (NULL == (bankd = TALER_TESTING_run_bank (cfgfilename, bc.bank_url))) { GNUNET_break (0); @@ -192,7 +204,7 @@ main (int argc, ret = TALER_TESTING_setup (&run, NULL, - CONFIG_FILE, + cfgfilename, NULL, GNUNET_NO); purge_process (twisterd); diff --git a/src/lib/test_bank_api_twisted.conf b/src/lib/test_bank_api_twisted.conf deleted file mode 100644 index 71bcaee00..000000000 --- a/src/lib/test_bank_api_twisted.conf +++ /dev/null @@ -1,39 +0,0 @@ - -[twister] -# HTTP listen port for twister -HTTP_PORT = 8888 -SERVE = tcp - -# HTTP Destination for twister. The test-Webserver needs -# to listen on the port used here. Note: no trailing '/'! -DESTINATION_BASE_URL = "http://localhost:8081" - -# Control port for TCP -# PORT = 8889 -HOSTNAME = localhost -ACCEPT_FROM = 127.0.0.1; -ACCEPT_FROM6 = ::1; - -# Control port for UNIX -UNIXPATH = /tmp/taler-service-twister.sock -UNIX_MATCH_UID = NO -UNIX_MATCH_GID = YES - -# Launching of twister by ARM -# BINARY = taler-service-twister -# AUTOSTART = NO -# FORCESTART = NO - -[taler] -currency = KUDOS - -[bank] -serve = http -http_port = 8081 -database = postgres:///talercheck - -[account-1] -URL = payto://x-taler-bank/localhost:8081/1 - -[exchange-wire-test] -bank_url = http://localhost:8081/ diff --git a/src/lib/test_exchange_api.conf b/src/lib/test_exchange_api.conf index aa95f1bcc..291e0a0e0 100644 --- a/src/lib/test_exchange_api.conf +++ b/src/lib/test_exchange_api.conf @@ -1,18 +1,10 @@ - # This file is in the public domain. # + [PATHS] # Persistant data storage for the testcase TALER_TEST_HOME = test_exchange_api_home/ -# Persistant data storage -TALER_DATA_HOME = $TALER_HOME/.local/share/taler/ - -# Configuration files -TALER_CONFIG_HOME = $TALER_HOME/.config/taler/ - -# Cached data, no big deal if lost -TALER_CACHE_HOME = $TALER_HOME/.cache/taler/ [taler] # Currency supported by the exchange (can only be one) @@ -52,9 +44,11 @@ BASE_URL = "http://localhost:8081/" # Keep it short so the test runs fast. LOOKAHEAD_SIGN = 12 h + [exchangedb-postgres] CONFIG = "postgres:///talercheck" + [auditordb-postgres] CONFIG = "postgres:///talercheck" @@ -77,6 +71,7 @@ WIRE_GATEWAY_URL = "http://localhost:9081/42/" # ENABLE_CREDIT = YES + [account-2] # What is the bank account (with the "Taler Bank" demo system)? URL = "payto://x-taler-bank/localhost/2" @@ -93,11 +88,6 @@ METHOD = x-taler-bank WIRE_GATEWAY_URL = "http://localhost:9081/2/" -# Authentication information for basic authentication -TALER_BANK_AUTH_METHOD = "basic" -USERNAME = user -PASSWORD = pass - ENABLE_DEBIT = YES ENABLE_CREDIT = YES diff --git a/src/lib/test_exchange_api_twisted.conf b/src/lib/test_exchange_api_twisted.conf index 845216cc8..28b254e67 100644 --- a/src/lib/test_exchange_api_twisted.conf +++ b/src/lib/test_exchange_api_twisted.conf @@ -1,39 +1,16 @@ # This file is in the public domain. # -[twister] -# HTTP listen port for twister -HTTP_PORT = 8888 -SERVE = tcp - -# HTTP Destination for twister. The test-Webserver needs -# to listen on the port used here. Note: no trailing '/'! -DESTINATION_BASE_URL = "http://localhost:8081" - -# Control port for TCP -# PORT = 8889 -HOSTNAME = localhost -ACCEPT_FROM = 127.0.0.1; -ACCEPT_FROM6 = ::1; - -# Control port for UNIX -UNIXPATH = /tmp/taler-service-twister.sock -UNIX_MATCH_UID = NO -UNIX_MATCH_GID = YES - -# Launching of twister by ARM -# BINARY = taler-service-twister -# AUTOSTART = NO -# FORCESTART = NO - [PATHS] # Persistant data storage for the testcase TALER_TEST_HOME = test_exchange_api_home/ + [taler] # Currency supported by the exchange (can only be one) CURRENCY = EUR + [exchange] # how long is one signkey valid? @@ -65,29 +42,74 @@ DB = postgres # only seeks the exchange/BASE_URL URL to connect to the exchange. BASE_URL = "http://localhost:8888/" + [exchangedb-postgres] -DB_CONN_STR = "postgres:///talercheck" +CONFIG = "postgres:///talercheck" + [auditor] -BASE_URL = "http://the.auditor/" +BASE_URL = "http://localhost:8083/" + +PORT = 8083 + [auditordb-postgres] CONFIG = "postgres:///talercheck" +[account-1] +# What is the URL of our account? +URL = "payto://x-taler-bank/localhost/42" +# This is the response we give out for the /wire request. It provides +# wallets with the bank information for transfers to the exchange. +WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json +# Which wire plugin should we used to access the account? +METHOD = x-taler-bank +WIRE_GATEWAY_URL = "http://localhost:9081/42/" +WIRE_GATEWAY_AUTH_METHOD = NONE + + [account-2] -URL = payto://x-taler-bank/2 +URL = payto://x-taler-bank/localhost/2 WIRE_GATEWAY_URL = "http://localhost:8082/2/" -PLUGIN = taler_bank WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-2.json -TALER_BANK_AUTH_METHOD = "basic" +WIRE_GATEWAY_AUTH_METHOD = BASIC USERNAME = user PASSWORD = pass ENABLE_DEBIT = YES ENABLE_CREDIT = YES +METHOD = x-taler-bank + [bank] HTTP_PORT = 8082 + +[twister] +# HTTP listen port for twister +HTTP_PORT = 8888 +SERVE = tcp + +# HTTP Destination for twister. The test-Webserver needs +# to listen on the port used here. Note: no trailing '/'! +DESTINATION_BASE_URL = "http://localhost:8081" + +# Control port for TCP +# PORT = 8889 +HOSTNAME = localhost +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; + +# Control port for UNIX +UNIXPATH = /tmp/taler-service-twister.sock +UNIX_MATCH_UID = NO +UNIX_MATCH_GID = YES + +# Launching of twister by ARM +# BINARY = taler-service-twister +# AUTOSTART = NO +# FORCESTART = NO + + [fees-x-taler-bank] # Fees for the forseeable future... # If you see this after 2017, update to match the next 10 years... |