From 9bc96506bb6441467c6558f5252e803c4292c9fe Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Apr 2016 17:32:10 +0200 Subject: update man pages and templates to use current options --- .../test-exchange-home/config/exchange-common.conf | 21 +++++++++++++-------- src/exchange-lib/test_exchange_api.c | 1 + .../test-exchange-home/config/exchange-common.conf | 12 +++++++++--- src/wire/plugin_wire_test.c | 21 +++++++++++---------- 4 files changed, 34 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/exchange-lib/test-exchange-home/config/exchange-common.conf b/src/exchange-lib/test-exchange-home/config/exchange-common.conf index 89b7f5182..97947f111 100644 --- a/src/exchange-lib/test-exchange-home/config/exchange-common.conf +++ b/src/exchange-lib/test-exchange-home/config/exchange-common.conf @@ -22,15 +22,20 @@ TESTRUN = YES [exchangedb-postgres] DB_CONN_STR = "postgres:///talercheck" -[wire-sepa] +[wire-incoming-sepa] SEPA_RESPONSE_FILE = "test-exchange-home/sepa.json" -[wire-test] +[wire-incoming-sepa] +SEPA_RESPONSE_FILE = "test-exchange-home/sepa.json" + +[wire-incoming-test] +# What is the main website of the bank? +BANK_URI = "http://localhost/" +# Into which account at the 'bank' should (incoming) wire transfers be made? +BANK_ACCOUNT_NUMBER = 2 + +[wire-outgoing-test] # What is the main website of the bank? BANK_URI = "http://localhost/" -# Into which account at the 'bank' should incoming -# wire transfers be made? -BANK_ACCOUNT_NO_INCOMING = 2 -# From which account at the 'bank' should outgoing -# wire transfers be made? -BANK_ACCOUNT_NO_OUTGOING = 2 \ No newline at end of file +# Into which account at the 'bank' should (incoming) wire transfers be made? +BANK_ACCOUNT_NUMBER = 2 diff --git a/src/exchange-lib/test_exchange_api.c b/src/exchange-lib/test_exchange_api.c index 6eae08f4d..bfe54d507 100644 --- a/src/exchange-lib/test_exchange_api.c +++ b/src/exchange-lib/test_exchange_api.c @@ -1227,6 +1227,7 @@ wire_cb (void *cls, struct InterpreterState *is = cls; struct Command *cmd = &is->commands[is->ip]; + cmd->details.wire.wh = NULL; if (cmd->expected_response_code != http_status) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, diff --git a/src/exchange/test-exchange-home/config/exchange-common.conf b/src/exchange/test-exchange-home/config/exchange-common.conf index e4ff2a4d6..4078cbee5 100644 --- a/src/exchange/test-exchange-home/config/exchange-common.conf +++ b/src/exchange/test-exchange-home/config/exchange-common.conf @@ -22,12 +22,18 @@ TESTRUN = YES [exchangedb-postgres] DB_CONN_STR = "postgres:///talercheck" -[wire-test] + +[wire-incoming-test] # What is the main website of the bank? BANK_URI = "http://localhost:8082/" # Into which account at the 'bank' should incoming # wire transfers be made? -BANK_ACCOUNT_NO_INCOMING = 2 +BANK_ACCOUNT_NUMBER = 2 + +[wire-outgoing-test] +# What is the main website of the bank? +BANK_URI = "http://localhost:8082/" + # From which account at the 'bank' should outgoing # wire transfers be made? -BANK_ACCOUNT_NO_OUTGOING = 3 +BANK_ACCOUNT_NUMBER = 3 diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c index a03f8127d..888501afb 100644 --- a/src/wire/plugin_wire_test.c +++ b/src/wire/plugin_wire_test.c @@ -44,9 +44,10 @@ struct TestClosure char *currency; /** - * Number of the account that the exchange has at the bank. + * Number of the account that the exchange has at the bank for outgoing + * transfers. */ - unsigned long long exchange_account_no; + unsigned long long exchange_account_outgoing_no; /** * Handle to the bank task, or NULL. @@ -576,7 +577,7 @@ test_execute_wire_transfer (void *cls, eh->aaih = TALER_BANK_admin_add_incoming (tc->bank, &bf.wtid, &amount, - (uint64_t) tc->exchange_account_no, + (uint64_t) tc->exchange_account_outgoing_no, (uint64_t) account_no, &execute_cb, eh); @@ -632,25 +633,25 @@ libtaler_plugin_wire_test_init (void *cls) { if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, - "wire-test", + "wire-outgoing-test", "BANK_URI", &uri)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "wire-test", + "wire-outgoing-test", "BANK_URI"); GNUNET_free (tc); return NULL; } if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (cfg, - "wire-test", - "BANK_ACCOUNT_NO_OUTGOING", - &tc->exchange_account_no)) + "wire-outgoing-test", + "BANK_ACCOUNT_NUMBER", + &tc->exchange_account_outgoing_no)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "wire-test", - "BANK_ACCOUNT_NO_OUTGOING"); + "wire-incoming-test", + "BANK_ACCOUNT_NUMBER"); GNUNET_free (uri); GNUNET_free (tc); return NULL; -- cgit v1.2.3