diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-05-04 13:47:08 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-05-04 13:47:08 +0200 |
commit | a93db26de5a8f5a2b756f3790cca61385787005f (patch) | |
tree | dd1f55fd7c2652cf282c281e6d1e1780f2668c5c | |
parent | 9edc884e360e3363ed6dff6bfe13f037f879432e (diff) |
Fixing config setup
-rw-r--r-- | src/lib/Makefile.am | 5 | ||||
-rw-r--r-- | src/lib/test-exchange-home/config/exchange-common.conf | 30 | ||||
-rw-r--r-- | src/lib/test-exchange-home/config/exchange-keyup.conf | 86 | ||||
-rw-r--r-- | src/lib/test-exchange-home/master.priv | 1 | ||||
-rw-r--r-- | src/lib/test-exchange-home/sepa.json | 6 | ||||
-rw-r--r-- | src/lib/test_merchant_api.c | 12 | ||||
-rw-r--r-- | src/lib/test_merchant_api.conf (renamed from src/lib/test_merchant.conf) | 11 | ||||
-rw-r--r-- | src/lib/test_merchant_api_home/.config/taler/merchant/wire/test.json | 5 | ||||
-rw-r--r-- | src/lib/test_merchant_api_home/.local/share/taler/exchange/offline-keys/master.priv | 1 |
9 files changed, 25 insertions, 132 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 7b0bd94f..e3ca0e26 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -52,4 +52,7 @@ test_merchant_api_LDADD = \ -ljansson EXTRA_DIST = \ - test_merchant.conf + test_merchant_api.conf \ + test_merchant_api_home/.local/share/taler/exchange/offline-keys/master.priv \ + test_merchant_api_home/.config/taler/merchant/wire/test.json \ + test_merchant.priv diff --git a/src/lib/test-exchange-home/config/exchange-common.conf b/src/lib/test-exchange-home/config/exchange-common.conf deleted file mode 100644 index 01dd6c89..00000000 --- a/src/lib/test-exchange-home/config/exchange-common.conf +++ /dev/null @@ -1,30 +0,0 @@ -[exchange] -# Currency supported by the exchange (can only be one) -CURRENCY = EUR - -# Wire format supported by the exchange -# We use 'test' for testing of the actual -# coin operations, and 'sepa' to test SEPA-specific routines. -WIREFORMAT = test sepa - -# 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 - -# Is this is a testcase, use transient DB actions? -TESTRUN = YES - -[exchangedb-postgres] - -DB_CONN_STR = "postgres:///talercheck" - -[exchange-wire-sepa] -SEPA_RESPONSE_FILE = "test-exchange-home/sepa.json" - -[exchange-wire-test] -REDIRECT_URL = "http://www.taler.net/" diff --git a/src/lib/test-exchange-home/config/exchange-keyup.conf b/src/lib/test-exchange-home/config/exchange-keyup.conf deleted file mode 100644 index 4a80da7e..00000000 --- a/src/lib/test-exchange-home/config/exchange-keyup.conf +++ /dev/null @@ -1,86 +0,0 @@ -[exchange_keys] - -# 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 generate denomination and signing keys -# ahead of time? -lookahead_sign = 32 weeks 1 day - -# how long do we provide to clients denomination and signing keys -# ahead of time? -lookahead_provide = 4 weeks 1 day - - -# Coin definitions are detected because the section -# name begins with "coin_". The rest of the -# name is free, but of course following the convention -# of "coin_$CURRENCY[_$SUBUNIT]_$VALUE" make sense. -[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 -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 -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 -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 -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 -rsa_keysize = 1024 - -[coin_eur_1000] -value = EUR:1000 -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 -rsa_keysize = 2048 diff --git a/src/lib/test-exchange-home/master.priv b/src/lib/test-exchange-home/master.priv deleted file mode 100644 index 39492693..00000000 --- a/src/lib/test-exchange-home/master.priv +++ /dev/null @@ -1 +0,0 @@ -p^-33XX!\0qmU_
\ No newline at end of file diff --git a/src/lib/test-exchange-home/sepa.json b/src/lib/test-exchange-home/sepa.json deleted file mode 100644 index 36d12f66..00000000 --- a/src/lib/test-exchange-home/sepa.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "receiver_name": "Max Mustermann", - "iban": "DE89370400440532013000", - "bic": "COBADEFF370", - "sig": "8M5YJXM68PRAXKH76HYEBCJW657B23JA0RFGNDMZK2379YZMT626H1BN89KC0M1KJBWGYEN5Z763Q0Y7MCTZQ6BPPT7D9KFCTW60C10" -}
\ No newline at end of file diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c index 9f087ee5..290df915 100644 --- a/src/lib/test_merchant_api.c +++ b/src/lib/test_merchant_api.c @@ -1320,7 +1320,7 @@ run (void *cls) { .oc = OC_ADMIN_ADD_INCOMING, .label = "create-reserve-1", .expected_response_code = MHD_HTTP_OK, - .details.admin_add_incoming.wire = "{ \"type\":\"TEST\", \"bank\":\"source bank\", \"account\":42 }", + .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account\":62 }", .details.admin_add_incoming.amount = "EUR:5.01" }, /* Withdraw a 5 EUR coin, at fee of 1 ct */ { .oc = OC_WITHDRAW_SIGN, @@ -1344,7 +1344,7 @@ run (void *cls) .details.pay.coin_ref = "withdraw-coin-1", .details.pay.amount_with_fee = "EUR:5", .details.pay.amount_without_fee = "EUR:4.99", - .details.pay.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account\":42 }", + .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account\":62 }", .details.pay.contract = "{ \"items\":[ {\"name\":\"ice cream\", \"value\":1} ] }", .details.pay.transaction_id = 1 }, @@ -1357,7 +1357,7 @@ run (void *cls) .details.pay.coin_ref = "withdraw-coin-1", .details.pay.amount_with_fee = "EUR:5", .details.pay.amount_without_fee = "EUR:4.99", - .details.pay.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account\":43 }", + .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account\":62 }", .details.pay.contract = "{ \"items\":[{ \"name\":\"ice cream\", \"value\":1} ] }", .details.pay.transaction_id = 1 }, /* Try to double-spend the 5 EUR coin at the same merchant (but different @@ -1370,7 +1370,7 @@ run (void *cls) .details.pay.coin_ref = "withdraw-coin-1", .details.pay.amount_with_fee = "EUR:5", .details.pay.amount_without_fee = "EUR:4.99", - .details.pay.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account\":42 }", + .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account\":62 }", .details.pay.contract = "{ \"items\":[ {\"name\":\"ice cream\", \"value\":1} ] }", .details.pay.transaction_id = 2 }, /* Try to double-spend the 5 EUR coin at the same merchant (but different @@ -1383,7 +1383,7 @@ run (void *cls) .details.pay.coin_ref = "withdraw-coin-1", .details.pay.amount_with_fee = "EUR:5", .details.pay.amount_without_fee = "EUR:4.99", - .details.pay.wire_details = "{ \"type\":\"TEST\", \"bank\":\"dest bank\", \"account\":42 }", + .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account\":62 }", .details.pay.contract = "{ \"items\":[ {\"name\":\"ice cream\", \"value\":2} ] }", .details.pay.transaction_id = 1 }, @@ -1429,6 +1429,8 @@ main (int argc, struct GNUNET_OS_Process *exchanged; struct GNUNET_OS_Process *merchantd; + unsetenv ("XDG_DATA_HOME"); + unsetenv ("XDG_CONFIG_HOME"); GNUNET_log_setup ("test-merchant-api", "WARNING", NULL); diff --git a/src/lib/test_merchant.conf b/src/lib/test_merchant_api.conf index e33f6197..8bc619e2 100644 --- a/src/lib/test_merchant.conf +++ b/src/lib/test_merchant_api.conf @@ -2,7 +2,7 @@ # [PATHS] # Persistant data storage for the testcase -TALER_TEST_HOME = test_exchange_api_home/ +TALER_TEST_HOME = test_merchant_api_home/ [merchant] @@ -26,10 +26,15 @@ EDATE = 3 week # Which plugin (backend) do we use for the DB. DB = postgres +# Which wireformat do we use? +WIREFORMAT = test + [exchange-taler] URI = http://localhost:8081/ MASTER_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG + + # Auditors must be in sections "auditor-", the rest of the section # name could be anything. [auditor-ezb] @@ -64,8 +69,8 @@ DB = postgres PORT = 8081 # Wire format supported by the exchange WIREFORMAT = test - - +# Our public key +MASTER_PUBLIC_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG [exchangedb-postgres] DB_CONN_STR = "postgres:///talercheck" diff --git a/src/lib/test_merchant_api_home/.config/taler/merchant/wire/test.json b/src/lib/test_merchant_api_home/.config/taler/merchant/wire/test.json new file mode 100644 index 00000000..42b3b19e --- /dev/null +++ b/src/lib/test_merchant_api_home/.config/taler/merchant/wire/test.json @@ -0,0 +1,5 @@ +{ + "type":"test", + "bank_uri":"http://localhost/", + "account_number":62 +} diff --git a/src/lib/test_merchant_api_home/.local/share/taler/exchange/offline-keys/master.priv b/src/lib/test_merchant_api_home/.local/share/taler/exchange/offline-keys/master.priv new file mode 100644 index 00000000..c20942d6 --- /dev/null +++ b/src/lib/test_merchant_api_home/.local/share/taler/exchange/offline-keys/master.priv @@ -0,0 +1 @@ +k;d_U}A.w"!Gv_m"_
\ No newline at end of file |