update man pages and templates to use current options

This commit is contained in:
Christian Grothoff 2016-04-01 17:32:10 +02:00
parent 76c8ab07e1
commit 9bc96506bb
6 changed files with 55 additions and 32 deletions

View File

@ -21,15 +21,23 @@ TESTRUN = YES
[exchangedb-postgres] [exchangedb-postgres]
DB_CONN_STR = "postgres:///talercheck" DB_CONN_STR = "postgres:///talercheck"
[wire-sepa] [wire-incoming-sepa]
SEPA_RESPONSE_FILE = "sepa.json" SEPA_RESPONSE_FILE = "sepa.json"
[wire-test] [wire-outgoing-sepa]
SEPA_RESPONSE_FILE = "sepa.json"
[wire-incoming-test]
# What is the main website of the bank? # What is the main website of the bank?
BANK_URI = "https://bank/" BANK_URI = "https://bank/"
# Into which account at the 'bank' should incoming # Into which account at the 'bank' should incoming
# wire transfers be made? # 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 = "https://bank/"
# From which account at the 'bank' should outgoing # From which account at the 'bank' should outgoing
# wire transfers be made? # wire transfers be made?
BANK_ACCOUNT_NO_OUTGOING = 2 BANK_ACCOUNT_NUMBER = 2

View File

@ -28,20 +28,23 @@ The following options are from the "[exchange]" section and used by most exchang
.SH WIRE transfer details .SH WIRE transfer details
The following options must be in section "[exchange-wire-test]": The following options must be in section "[wire\-incoming\-test]" and "[wire\-outgoing\-test]":
.IP REDIRECT_URL .IP BANK_URI
URL to redirect /wire/test to. Should contain a Web form the user can use to charge his wallet with coins in a "test" currency for testing. If this option is not provided, /wire/test will return "501 NOT IMPLEMENTED". URL of the Taler bank.
The following options must be in section "[exchange-wire-sepa]": .IP BANK_ACCOUNT_NUMBER
Number of the bank account of the exchange.
The following options must be in section "[wire\-incoming\-sepa]" and "[wire\-outgoing\-sepa]":
.IP SEPA_RESPONSE_FILE .IP SEPA_RESPONSE_FILE
Filename with the JSON body for the /wire/sepa response, signed using the exchange's long-term offline master key. If this option is not provided, /wire/test will return "501 NOT IMPLEMENTED". Use "taler-exchange-sepa" to create the SEPA_RESPONSE_FILE. Filename with the JSON body for the /wire response, signed using the exchange\'s long-term offline master key. Use taler\-exchange\-sepa to create the SEPA_RESPONSE_FILE.
.SH Postgres database options .SH Postgres database options
The following options must be in section "[exchangedb-postgres]": The following options must be in section "[exchangedb\-postgres]":
.IP DB_CONN_STR .IP DB_CONN_STR
How to access the database, i.e. "postgres:///taler" to use the "taler" database. Testcases use "talercheck". How to access the database, i.e. "postgres:///taler" to use the "taler" database. Testcases use "talercheck".
@ -86,4 +89,3 @@ Report bugs by using Mantis <https://gnunet.org/bugs/> or by sending electronic
.SH "SEE ALSO" .SH "SEE ALSO"
\fBtaler\-exchange\-httpd\fP(1), \fBtaler\-exchange\-keyup\fP(1), \fBtaler\-exchange\-reservemod\fP(1), \fBtaler\-exchange\-dbinit\fP(1), \fBtaler\-exchange\-sepa(1) \fBtaler\-exchange\-httpd\fP(1), \fBtaler\-exchange\-keyup\fP(1), \fBtaler\-exchange\-reservemod\fP(1), \fBtaler\-exchange\-dbinit\fP(1), \fBtaler\-exchange\-sepa(1)

View File

@ -22,15 +22,20 @@ TESTRUN = YES
[exchangedb-postgres] [exchangedb-postgres]
DB_CONN_STR = "postgres:///talercheck" DB_CONN_STR = "postgres:///talercheck"
[wire-sepa] [wire-incoming-sepa]
SEPA_RESPONSE_FILE = "test-exchange-home/sepa.json" 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? # What is the main website of the bank?
BANK_URI = "http://localhost/" BANK_URI = "http://localhost/"
# Into which account at the 'bank' should incoming # Into which account at the 'bank' should (incoming) wire transfers be made?
# wire transfers be made? BANK_ACCOUNT_NUMBER = 2
BANK_ACCOUNT_NO_INCOMING = 2
# From which account at the 'bank' should outgoing [wire-outgoing-test]
# wire transfers be made? # What is the main website of the bank?
BANK_ACCOUNT_NO_OUTGOING = 2 BANK_URI = "http://localhost/"
# Into which account at the 'bank' should (incoming) wire transfers be made?
BANK_ACCOUNT_NUMBER = 2

View File

@ -1227,6 +1227,7 @@ wire_cb (void *cls,
struct InterpreterState *is = cls; struct InterpreterState *is = cls;
struct Command *cmd = &is->commands[is->ip]; struct Command *cmd = &is->commands[is->ip];
cmd->details.wire.wh = NULL;
if (cmd->expected_response_code != http_status) if (cmd->expected_response_code != http_status)
{ {
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, GNUNET_log (GNUNET_ERROR_TYPE_ERROR,

View File

@ -22,12 +22,18 @@ TESTRUN = YES
[exchangedb-postgres] [exchangedb-postgres]
DB_CONN_STR = "postgres:///talercheck" DB_CONN_STR = "postgres:///talercheck"
[wire-test]
[wire-incoming-test]
# What is the main website of the bank? # What is the main website of the bank?
BANK_URI = "http://localhost:8082/" BANK_URI = "http://localhost:8082/"
# Into which account at the 'bank' should incoming # Into which account at the 'bank' should incoming
# wire transfers be made? # 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 # From which account at the 'bank' should outgoing
# wire transfers be made? # wire transfers be made?
BANK_ACCOUNT_NO_OUTGOING = 3 BANK_ACCOUNT_NUMBER = 3

View File

@ -44,9 +44,10 @@ struct TestClosure
char *currency; 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. * 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, eh->aaih = TALER_BANK_admin_add_incoming (tc->bank,
&bf.wtid, &bf.wtid,
&amount, &amount,
(uint64_t) tc->exchange_account_no, (uint64_t) tc->exchange_account_outgoing_no,
(uint64_t) account_no, (uint64_t) account_no,
&execute_cb, &execute_cb,
eh); eh);
@ -632,25 +633,25 @@ libtaler_plugin_wire_test_init (void *cls)
{ {
if (GNUNET_OK != if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg, GNUNET_CONFIGURATION_get_value_string (cfg,
"wire-test", "wire-outgoing-test",
"BANK_URI", "BANK_URI",
&uri)) &uri))
{ {
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"wire-test", "wire-outgoing-test",
"BANK_URI"); "BANK_URI");
GNUNET_free (tc); GNUNET_free (tc);
return NULL; return NULL;
} }
if (GNUNET_OK != if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_number (cfg, GNUNET_CONFIGURATION_get_value_number (cfg,
"wire-test", "wire-outgoing-test",
"BANK_ACCOUNT_NO_OUTGOING", "BANK_ACCOUNT_NUMBER",
&tc->exchange_account_no)) &tc->exchange_account_outgoing_no))
{ {
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"wire-test", "wire-incoming-test",
"BANK_ACCOUNT_NO_OUTGOING"); "BANK_ACCOUNT_NUMBER");
GNUNET_free (uri); GNUNET_free (uri);
GNUNET_free (tc); GNUNET_free (tc);
return NULL; return NULL;