summaryrefslogtreecommitdiff
path: root/src/exchange-lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-10 17:10:20 +0200
committerChristian Grothoff <christian@grothoff.org>2016-04-10 17:10:20 +0200
commit30d66bcebc27a1cdcbad39ddbeeaf047da6cc1dd (patch)
treeb78ddf34d0360b2cf87037009d32dac0d3eaeb91 /src/exchange-lib
parent5fb65f59b2de184f4fcb1417923711bd64fe781a (diff)
downloadexchange-30d66bcebc27a1cdcbad39ddbeeaf047da6cc1dd.tar.gz
exchange-30d66bcebc27a1cdcbad39ddbeeaf047da6cc1dd.tar.bz2
exchange-30d66bcebc27a1cdcbad39ddbeeaf047da6cc1dd.zip
fixing #4386: use more sane configuration and data file structure
Diffstat (limited to 'src/exchange-lib')
-rw-r--r--src/exchange-lib/Makefile.am5
-rw-r--r--src/exchange-lib/test-exchange-home/config/exchange-common.conf41
-rw-r--r--src/exchange-lib/test_exchange_api.c8
-rw-r--r--src/exchange-lib/test_exchange_api.conf (renamed from src/exchange-lib/test-exchange-home/config/exchange-keyup.conf)62
-rw-r--r--src/exchange-lib/test_exchange_api_home/.config/taler/sepa.json (renamed from src/exchange-lib/test-exchange-home/sepa.json)0
-rw-r--r--src/exchange-lib/test_exchange_api_home/.local/share/taler/exchange/offline-keys/master.priv (renamed from src/exchange-lib/test-exchange-home/master.priv)0
6 files changed, 44 insertions, 72 deletions
diff --git a/src/exchange-lib/Makefile.am b/src/exchange-lib/Makefile.am
index 49cb234a1..58a903342 100644
--- a/src/exchange-lib/Makefile.am
+++ b/src/exchange-lib/Makefile.am
@@ -61,5 +61,6 @@ test_exchange_api_LDADD = \
-ljansson
EXTRA_DIST = \
- test-exchange-home/config/exchange-common.conf \
- test-exchange-home/master.priv
+ test_taler_exchange_api_home/.local/share/taler/exchange/offline-keys/master.priv \
+ test_taler_exchange_api_home/.config/taler/sepa.json \
+ test_taler_exchange_api.conf
diff --git a/src/exchange-lib/test-exchange-home/config/exchange-common.conf b/src/exchange-lib/test-exchange-home/config/exchange-common.conf
deleted file mode 100644
index 97947f111..000000000
--- a/src/exchange-lib/test-exchange-home/config/exchange-common.conf
+++ /dev/null
@@ -1,41 +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"
-
-[wire-incoming-sepa]
-SEPA_RESPONSE_FILE = "test-exchange-home/sepa.json"
-
-[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_NUMBER = 2
diff --git a/src/exchange-lib/test_exchange_api.c b/src/exchange-lib/test_exchange_api.c
index c7eb9e314..68f4852be 100644
--- a/src/exchange-lib/test_exchange_api.c
+++ b/src/exchange-lib/test_exchange_api.c
@@ -2539,13 +2539,15 @@ main (int argc,
GNUNET_log_setup ("test-exchange-api",
"WARNING",
NULL);
+ /* These might get in the way... */
+ unsetenv ("XDG_DATA_HOME");
+ unsetenv ("XDG_CONFIG_HOME");
proc = GNUNET_OS_start_process (GNUNET_NO,
GNUNET_OS_INHERIT_STD_ALL,
NULL, NULL, NULL,
"taler-exchange-keyup",
"taler-exchange-keyup",
- "-d", "test-exchange-home",
- "-m", "test-exchange-home/master.priv",
+ "-c", "test_exchange_api.conf",
NULL);
GNUNET_OS_process_wait (proc);
GNUNET_OS_process_destroy (proc);
@@ -2554,7 +2556,7 @@ main (int argc,
NULL, NULL, NULL,
"taler-exchange-httpd",
"taler-exchange-httpd",
- "-d", "test-exchange-home",
+ "-c", "test_exchange_api.conf",
NULL);
/* give child time to start and bind against the socket */
fprintf (stderr, "Waiting for taler-exchange-httpd to be ready");
diff --git a/src/exchange-lib/test-exchange-home/config/exchange-keyup.conf b/src/exchange-lib/test_exchange_api.conf
index 4a80da7e9..e1e916bd2 100644
--- a/src/exchange-lib/test-exchange-home/config/exchange-keyup.conf
+++ b/src/exchange-lib/test_exchange_api.conf
@@ -1,24 +1,45 @@
-[exchange_keys]
+# This file is in the public domain.
+#
+[PATHS]
+# Persistant data storage for the testcase
+TALER_TEST_HOME = test_exchange_api_home/
-# how long is one signkey valid?
-signkey_duration = 4 weeks
+[exchange]
+# Currency supported by the exchange (can only be one)
+CURRENCY = EUR
-# how long are the signatures with the signkey valid?
-legal_duration = 2 years
+# 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
-# how long do we generate denomination and signing keys
-# ahead of time?
-lookahead_sign = 32 weeks 1 day
+# HTTP port the exchange listens to
+PORT = 8081
-# how long do we provide to clients denomination and signing keys
-# ahead of time?
-lookahead_provide = 4 weeks 1 day
+# 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"
+
+[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_NUMBER = 2
-# 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
@@ -73,14 +94,3 @@ 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/exchange-lib/test-exchange-home/sepa.json b/src/exchange-lib/test_exchange_api_home/.config/taler/sepa.json
index b435ce86b..b435ce86b 100644
--- a/src/exchange-lib/test-exchange-home/sepa.json
+++ b/src/exchange-lib/test_exchange_api_home/.config/taler/sepa.json
diff --git a/src/exchange-lib/test-exchange-home/master.priv b/src/exchange-lib/test_exchange_api_home/.local/share/taler/exchange/offline-keys/master.priv
index 394926938..394926938 100644
--- a/src/exchange-lib/test-exchange-home/master.priv
+++ b/src/exchange-lib/test_exchange_api_home/.local/share/taler/exchange/offline-keys/master.priv