summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-04 13:23:00 +0200
committerChristian Grothoff <christian@grothoff.org>2016-05-04 13:23:00 +0200
commit9edc884e360e3363ed6dff6bfe13f037f879432e (patch)
tree4e060e31b3460b68be27480a78b7ce0e66cbd9ff
parente43b632f2b0863d4d0ea03983e3846fc9831123e (diff)
downloadmerchant-9edc884e360e3363ed6dff6bfe13f037f879432e.tar.gz
merchant-9edc884e360e3363ed6dff6bfe13f037f879432e.tar.bz2
merchant-9edc884e360e3363ed6dff6bfe13f037f879432e.zip
fix fmt string issues
-rw-r--r--src/backenddb/plugin_merchantdb_postgres.c2
-rw-r--r--src/lib/merchant_api_pay.c2
-rw-r--r--src/lib/test_merchant.conf71
-rw-r--r--src/lib/test_merchant_api.c13
4 files changed, 75 insertions, 13 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c
index a4898910..e106a82e 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -238,7 +238,7 @@ postgres_check_payment(void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Could not check if contract %llu is in DB: %s\n",
- transaction_id,
+ (unsigned long long) transaction_id,
sqlstate);
PQclear (res);
return GNUNET_SYSERR;
diff --git a/src/lib/merchant_api_pay.c b/src/lib/merchant_api_pay.c
index 846e0702..3c8975d7 100644
--- a/src/lib/merchant_api_pay.c
+++ b/src/lib/merchant_api_pay.c
@@ -114,7 +114,7 @@ handle_pay_finished (void *cls,
/* unexpected response code */
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Unexpected response code %u\n",
- response_code);
+ (unsigned int) response_code);
GNUNET_break (0);
response_code = 0;
break;
diff --git a/src/lib/test_merchant.conf b/src/lib/test_merchant.conf
index bf2335d8..e33f6197 100644
--- a/src/lib/test_merchant.conf
+++ b/src/lib/test_merchant.conf
@@ -1,4 +1,9 @@
-# Sample configuration file for a merchant.
+# This file is in the public domain.
+#
+[PATHS]
+# Persistant data storage for the testcase
+TALER_TEST_HOME = test_exchange_api_home/
+
[merchant]
# Which port do we run the backend on? (HTTP server)
@@ -13,9 +18,6 @@ KEYFILE = test_merchant.priv
# What currency does this backend accept?
CURRENCY = EUR
-# FIXME: to be revised
-TRUSTED_EXCHANGES = taler
-
# How quickly do we want the exchange to send us our money?
# Used only if the frontend does not specify a value.
# FIXME: EDATE is a bit short, 'execution_delay'?
@@ -53,3 +55,64 @@ NAME = GNUNET E.V
BIC = GENODEF1SRL
SALT = 17919252168512238964
ADDRESS = "Garching"
+
+
+[exchange]
+# How to access our database
+DB = postgres
+# HTTP port the exchange listens to
+PORT = 8081
+# Wire format supported by the exchange
+WIREFORMAT = test
+
+
+
+[exchangedb-postgres]
+DB_CONN_STR = "postgres:///talercheck"
+
+[exchange-wire-incoming-test]
+# This is the response we give out for the /wire request. It provides
+# wallets with the bank information for transfers to the exchange.
+TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/test.json
+
+[exchange-wire-outgoing-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_NUMBER = 2
+
+[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
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index b5074861..9f087ee5 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -789,9 +789,9 @@ find_pk (const struct TALER_EXCHANGE_Keys *keys,
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Have denomination key for `%s', but with wrong expiration range %llu vs [%llu,%llu)\n",
str,
- now.abs_value_us,
- pk->valid_from.abs_value_us,
- pk->withdraw_valid_until.abs_value_us);
+ (unsigned long long) now.abs_value_us,
+ (unsigned long long) pk->valid_from.abs_value_us,
+ (unsigned long long) pk->withdraw_valid_until.abs_value_us);
GNUNET_free (str);
return NULL;
}
@@ -1442,8 +1442,7 @@ main (int argc,
NULL, NULL, NULL,
"taler-exchange-keyup",
"taler-exchange-keyup",
- "-d", "test-exchange-home",
- "-m", "test-exchange-home/master.priv",
+ "-c", "test_merchant_api.conf",
NULL);
GNUNET_OS_process_wait (proc);
GNUNET_OS_process_destroy (proc);
@@ -1452,7 +1451,7 @@ main (int argc,
NULL, NULL, NULL,
"taler-exchange-httpd",
"taler-exchange-httpd",
- "-d", "test-exchange-home",
+ "-c", "test_merchant_api.conf",
NULL);
/* give child time to start and bind against the socket */
fprintf (stderr, "Waiting for taler-exchange-httpd to be ready");
@@ -1468,7 +1467,7 @@ main (int argc,
NULL, NULL, NULL,
"taler-merchant-httpd",
"taler-merchant-httpd",
- "-c", "test_merchant.conf",
+ "-c", "test_merchant_api.conf",
NULL);
/* give child time to start and bind against the socket */
fprintf (stderr, "Waiting for taler-merchant-httpd to be ready");