From f155aff749215b4fb287a915551c18c80abd2540 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 18 Nov 2018 11:57:48 +0100 Subject: add basic test configuration --- src/auditor-lib/test_auditor_api.c | 15 +- src/auditor-lib/test_auditor_api.conf | 202 +++++++++++++++++++++ .../.config/taler/account-1.json | 5 + .../.config/taler/account-2.json | 4 + .../test_exchange_api_home/.config/taler/sepa.json | 9 + .../test_exchange_api_home/.config/taler/test.json | 8 + .../.config/taler/x-taler-bank.json | 4 + .../share/taler/auditor/offline-keys/auditor.priv | 1 + .../share/taler/exchange/offline-keys/master.priv | 1 + .../share/taler/exchange/wirefees/x-taler-bank.fee | Bin 0 -> 600 bytes 10 files changed, 248 insertions(+), 1 deletion(-) create mode 100644 src/auditor-lib/test_exchange_api_home/.config/taler/account-1.json create mode 100644 src/auditor-lib/test_exchange_api_home/.config/taler/account-2.json create mode 100644 src/auditor-lib/test_exchange_api_home/.config/taler/sepa.json create mode 100644 src/auditor-lib/test_exchange_api_home/.config/taler/test.json create mode 100644 src/auditor-lib/test_exchange_api_home/.config/taler/x-taler-bank.json create mode 100644 src/auditor-lib/test_exchange_api_home/.local/share/taler/auditor/offline-keys/auditor.priv create mode 100644 src/auditor-lib/test_exchange_api_home/.local/share/taler/exchange/offline-keys/master.priv create mode 100644 src/auditor-lib/test_exchange_api_home/.local/share/taler/exchange/wirefees/x-taler-bank.fee (limited to 'src') diff --git a/src/auditor-lib/test_auditor_api.c b/src/auditor-lib/test_auditor_api.c index 1702260d8..9db6bb421 100644 --- a/src/auditor-lib/test_auditor_api.c +++ b/src/auditor-lib/test_auditor_api.c @@ -125,9 +125,22 @@ static char *exchange_url; EXCHANGE_ACCOUNT_NO, USER_LOGIN_NAME, USER_LOGIN_PASS, \ subject, exchange_url) +/** + * Run the taler-auditor. + * + * @param label label to use for the command. + */ #define CMD_RUN_AUDITOR(label) \ TALER_TESTING_cmd_exec_auditor (label, CONFIG_FILE) +/** + * Run the taler-wire-auditor. + * + * @param label label to use for the command. + */ +#define CMD_RUN_WIRE_AUDITOR(label) \ + TALER_TESTING_cmd_exec_wire_auditor (label, CONFIG_FILE) + /** * Main function that will tell the interpreter what commands to @@ -140,8 +153,8 @@ run (void *cls, struct TALER_TESTING_Interpreter *is) { struct TALER_TESTING_Command commands[] = { - CMD_RUN_AUDITOR_DBINIT("virgin-auditor"), CMD_RUN_AUDITOR("virgin-auditor"), + CMD_RUN_WIRE_AUDITOR("virgin-wire-auditor"), /** * End the suite. Fixme: better to have a label for this diff --git a/src/auditor-lib/test_auditor_api.conf b/src/auditor-lib/test_auditor_api.conf index e69de29bb..532f9c932 100644 --- a/src/auditor-lib/test_auditor_api.conf +++ b/src/auditor-lib/test_auditor_api.conf @@ -0,0 +1,202 @@ + +# This file is in the public domain. +# +[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 + +[auditor] +BASE_URL = "http://localhost:8083/" + +# HTTP port the auditor listens to +PORT = 8083 + +[exchange] + +# how long is one signkey valid? +signkey_duration = 4 weeks + +# how long are the signatures with the signkey valid? +legal_duration = 2 years + +# how long do we provide to clients denomination and signing keys +# ahead of time? +lookahead_provide = 4 weeks 1 day + +# HTTP port the exchange listens to +PORT = 8081 + +# Master public key used to sign the exchange's various keys +MASTER_PUBLIC_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG + +# How to access our database +DB = postgres + +# Base URL of the exchange. Must be set to a URL where the +# exchange (or the twister) is actually listening. +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" + +# Sections starting with "account-" configure the bank accounts +# of the exchange. The "URL" specifies the account in +# payto://-format, while the WIRE_JSON specifies the +# (possibly offline) signed version to be returned in /wire. +# WIRE_JSON is optional, as not all accounts must be +# advertised in /wire. +[account-1] +# What is the URL of our account? +URL = "payto://sepa/CH9300762011623852957" +# 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? +PLUGIN = ebics + +# ENABLE_CREDIT = YES + +[account-2] +# What is the bank account (with the "Taler Bank" demo system)? +URL = "payto://x-taler-bank/localhost:8082/2" + +# 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-2.json + +# Which wire plugin should we used to access the account? +PLUGIN = taler_bank + +# Authentication information for basic authentication +TALER_BANK_AUTH_METHOD = "basic" +USERNAME = user +PASSWORD = pass + +ENABLE_DEBIT = YES + +ENABLE_CREDIT = YES + + +# Sections starting with "fee-" configure the wire fee for the +# respective wire method. +[fees-sepa] +# Fees for the forseeable future... +# If you see this after 2017, update to match the next 10 years... +WIRE-FEE-2018 = EUR:0.01 +WIRE-FEE-2019 = EUR:0.01 +WIRE-FEE-2020 = EUR:0.01 +WIRE-FEE-2021 = EUR:0.01 +WIRE-FEE-2022 = EUR:0.01 +WIRE-FEE-2023 = EUR:0.01 +WIRE-FEE-2024 = EUR:0.01 +WIRE-FEE-2025 = EUR:0.01 +WIRE-FEE-2026 = EUR:0.01 +WIRE-FEE-2027 = EUR:0.01 + +CLOSING-FEE-2018 = EUR:0.01 +CLOSING-FEE-2019 = EUR:0.01 +CLOSING-FEE-2020 = EUR:0.01 +CLOSING-FEE-2021 = EUR:0.01 +CLOSING-FEE-2022 = EUR:0.01 +CLOSING-FEE-2023 = EUR:0.01 +CLOSING-FEE-2024 = EUR:0.01 +CLOSING-FEE-2025 = EUR:0.01 +CLOSING-FEE-2026 = EUR:0.01 +CLOSING-FEE-2027 = EUR:0.01 + +[fees-x-taler-bank] +# Fees for the forseeable future... +# If you see this after 2017, update to match the next 10 years... +WIRE-FEE-2018 = EUR:0.01 +WIRE-FEE-2019 = EUR:0.01 +WIRE-FEE-2020 = EUR:0.01 +WIRE-FEE-2021 = EUR:0.01 +WIRE-FEE-2022 = EUR:0.01 +WIRE-FEE-2023 = EUR:0.01 +WIRE-FEE-2024 = EUR:0.01 +WIRE-FEE-2025 = EUR:0.01 +WIRE-FEE-2026 = EUR:0.01 +WIRE-FEE-2027 = EUR:0.01 + +CLOSING-FEE-2018 = EUR:0.01 +CLOSING-FEE-2019 = EUR:0.01 +CLOSING-FEE-2020 = EUR:0.01 +CLOSING-FEE-2021 = EUR:0.01 +CLOSING-FEE-2022 = EUR:0.01 +CLOSING-FEE-2023 = EUR:0.01 +CLOSING-FEE-2024 = EUR:0.01 +CLOSING-FEE-2025 = EUR:0.01 +CLOSING-FEE-2026 = EUR:0.01 +CLOSING-FEE-2027 = EUR:0.01 + +# Sections starting with "coin_" specify which denominations +# the exchange should support (and their respective fee structure) +[coin_eur_ct_1] +value = EUR:0.01 +duration_overlap = 5 minutes +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = EUR:0.00 +fee_deposit = EUR:0.00 +fee_refresh = EUR:0.01 +fee_refund = EUR:0.01 +rsa_keysize = 1024 + +[coin_eur_ct_10] +value = EUR:0.10 +duration_overlap = 5 minutes +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = EUR:0.01 +fee_deposit = EUR:0.01 +fee_refresh = EUR:0.03 +fee_refund = EUR:0.01 +rsa_keysize = 1024 + +[coin_eur_1] +value = EUR:1 +duration_overlap = 5 minutes +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = EUR:0.01 +fee_deposit = EUR:0.01 +fee_refresh = EUR:0.03 +fee_refund = EUR:0.01 +rsa_keysize = 1024 + +[coin_eur_5] +value = EUR:5 +duration_overlap = 5 minutes +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = EUR:0.01 +fee_deposit = EUR:0.01 +fee_refresh = EUR:0.03 +fee_refund = EUR:0.01 +rsa_keysize = 1024 + +[coin_eur_10] +value = EUR:10 +duration_overlap = 5 minutes +duration_withdraw = 7 days +duration_spend = 2 years +duration_legal = 3 years +fee_withdraw = EUR:0.01 +fee_deposit = EUR:0.01 +fee_refresh = EUR:0.03 +fee_refund = EUR:0.01 +rsa_keysize = 1024 diff --git a/src/auditor-lib/test_exchange_api_home/.config/taler/account-1.json b/src/auditor-lib/test_exchange_api_home/.config/taler/account-1.json new file mode 100644 index 000000000..48093f2aa --- /dev/null +++ b/src/auditor-lib/test_exchange_api_home/.config/taler/account-1.json @@ -0,0 +1,5 @@ +{ + "url": "payto://sepa/CH9300762011623852957", + "salt": "N83T9J9202WCC8TQFDMJDWEGZNBEKA33C1ZM241VNYH88RZNTHPW509Y1M2YF7Y098R8VRESWQ05H03BK1SPAZCWE54KARDCKT5N8AG", + "master_sig": "D4V5GJ998YK7D6N0N56AD0J6MZNFEW6MRZT2CFPVQ5ME3NMQ59AA2007CXYESSFGRN70CNCFM06858QSSENCWTZM8VHEJ93YQ20ZJ1R" +} \ No newline at end of file diff --git a/src/auditor-lib/test_exchange_api_home/.config/taler/account-2.json b/src/auditor-lib/test_exchange_api_home/.config/taler/account-2.json new file mode 100644 index 000000000..159e03171 --- /dev/null +++ b/src/auditor-lib/test_exchange_api_home/.config/taler/account-2.json @@ -0,0 +1,4 @@ +{ + "url": "payto://x-taler-bank/localhost:8082/2", + "master_sig": "HC47BZN3C0KJ2VPMJ5EJWD2FXJ72AET0NWFE6JGSGK5CXS4GSKJJ6Z7BTS56JWM7B40SD61Z5GYYMRRE3X9JTJBVMWE0X7XHNXQ9P38" +} \ No newline at end of file diff --git a/src/auditor-lib/test_exchange_api_home/.config/taler/sepa.json b/src/auditor-lib/test_exchange_api_home/.config/taler/sepa.json new file mode 100644 index 000000000..b435ce86b --- /dev/null +++ b/src/auditor-lib/test_exchange_api_home/.config/taler/sepa.json @@ -0,0 +1,9 @@ +{ + "name": "Max Musterman", + "bic": "COBADEFF370", + "type": "sepa", + "sig": "4EVRC2MCJPXQC8MC00831DNWEXMZAP4JQDDE1A7R6KR3MANG24RC1VQ55AX5A2E35S58VW1VSTENFTPHG5MWG9BSN8B8WXSV21KKW20", + "address": "Musterstadt", + "salt": "3KTM1ZRMWGEQPQ254S4R5R4Q8XM0ZYWTCTE01TZ76MVBSQ6RX7A5DR08WXVH1DCHR1R7ACRB7X0EVC2XDW1CBZM9WFSD9TRMZ90BR98", + "iban": "DE89370400440532013000" +} \ No newline at end of file diff --git a/src/auditor-lib/test_exchange_api_home/.config/taler/test.json b/src/auditor-lib/test_exchange_api_home/.config/taler/test.json new file mode 100644 index 000000000..eca394241 --- /dev/null +++ b/src/auditor-lib/test_exchange_api_home/.config/taler/test.json @@ -0,0 +1,8 @@ +{ + "salt": "AZPRFVJ58NM6M7J5CZQPJAH3EW5DYM52AEZ9Y1C1ER3W94QV8D8TQKF6CK8MYQRA9QMSKDQTGZ306ZS9GQ0M6R01CJ20KPP49WFDZK8", + "name": "The exchange", + "account_number": 3, + "bank_url": "http://localhost:8082/", + "type": "test", + "sig": "RPQXP9S4P8PQP7HEZQNRSZCT0ATNEP8GW0P5TPM34V5RX86FCD670V44R9NETSYDDKB8SZV7TKY9PAJYTY51D3VDWY9XXQ5BPFRXR28" +} diff --git a/src/auditor-lib/test_exchange_api_home/.config/taler/x-taler-bank.json b/src/auditor-lib/test_exchange_api_home/.config/taler/x-taler-bank.json new file mode 100644 index 000000000..a15df27ca --- /dev/null +++ b/src/auditor-lib/test_exchange_api_home/.config/taler/x-taler-bank.json @@ -0,0 +1,4 @@ +{ + "url": "payto://x-taler-bank/http://localhost:8082/2", + "master_sig": "KQ0BWSCNVR7HGGSAMCYK8ZM30RBS1MHMXT3QBN01PZWC9TV72FEE5RJ7T84C8134EPV6WEBXXY2MTFNE8ZXST6JEJQKR8HX6FQPVY10" +} \ No newline at end of file diff --git a/src/auditor-lib/test_exchange_api_home/.local/share/taler/auditor/offline-keys/auditor.priv b/src/auditor-lib/test_exchange_api_home/.local/share/taler/auditor/offline-keys/auditor.priv new file mode 100644 index 000000000..d71a7722c --- /dev/null +++ b/src/auditor-lib/test_exchange_api_home/.local/share/taler/auditor/offline-keys/auditor.priv @@ -0,0 +1 @@ +~}K+*hm^-{{0Z4 \ No newline at end of file diff --git a/src/auditor-lib/test_exchange_api_home/.local/share/taler/exchange/offline-keys/master.priv b/src/auditor-lib/test_exchange_api_home/.local/share/taler/exchange/offline-keys/master.priv new file mode 100644 index 000000000..394926938 --- /dev/null +++ b/src/auditor-lib/test_exchange_api_home/.local/share/taler/exchange/offline-keys/master.priv @@ -0,0 +1 @@ +p^-33XX!\0qmU_ \ No newline at end of file diff --git a/src/auditor-lib/test_exchange_api_home/.local/share/taler/exchange/wirefees/x-taler-bank.fee b/src/auditor-lib/test_exchange_api_home/.local/share/taler/exchange/wirefees/x-taler-bank.fee new file mode 100644 index 000000000..e1941f300 Binary files /dev/null and b/src/auditor-lib/test_exchange_api_home/.local/share/taler/exchange/wirefees/x-taler-bank.fee differ -- cgit v1.2.3