diff options
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | src/lib/merchant_api_tip_pickup.c | 1 | ||||
-rw-r--r-- | src/testing/Makefile.am | 65 | ||||
-rw-r--r-- | src/testing/test_merchant_api-cs.conf | 172 | ||||
-rw-r--r-- | src/testing/test_merchant_api-rsa.conf (renamed from src/testing/test_merchant_api.conf) | 0 | ||||
-rw-r--r-- | src/testing/test_merchant_api.c | 44 | ||||
-rw-r--r-- | src/testing/test_merchant_api_twisted-cs.conf (renamed from src/testing/test_merchant_api_twisted.conf) | 2 | ||||
-rw-r--r-- | src/testing/test_merchant_api_twisted-rsa.conf | 18 | ||||
-rw-r--r-- | src/testing/test_merchant_api_twisted.c | 73 |
9 files changed, 320 insertions, 62 deletions
@@ -33,14 +33,15 @@ tags *.gcda src/backend/taler-merchant-httpd src/merchant-tools/taler-merchant-dbinit -src/testing/test_merchant_api -src/testing/test_merchant_api_new +src/testing/test_merchant_api_cs +src/testing/test_merchant_api_rsa src/testing/test_merchant_api_home/.local/share/taler/exchange/live-keys/ src/testing/test_merchant_api_home/.local/share/taler/wirefees/ src/testing/auditor.in src/testing/test_merchant_api_home/.local/share/taler/auditor/ src/testing/test_merchant_api_home/.local/share/taler/auditors/ -src/testing/test_merchant_api_twisted +src/testing/test_merchant_api_twisted_cs +src/testing/test_merchant_api_twisted_rsa taler_merchant_config.h taler_merchant_config.h.in !doc/*.texi diff --git a/src/lib/merchant_api_tip_pickup.c b/src/lib/merchant_api_tip_pickup.c index b9ca9d59..9ed9afa1 100644 --- a/src/lib/merchant_api_tip_pickup.c +++ b/src/lib/merchant_api_tip_pickup.c @@ -277,6 +277,7 @@ csr_cb (void *cls, { struct TALER_MERCHANT_TipPickupHandle *tp = cls; + tp->csr = NULL; switch (csrr->hr.http_status) { case MHD_HTTP_OK: diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am index 2e3532bd..e12fac6e 100644 --- a/src/testing/Makefile.am +++ b/src/testing/Makefile.am @@ -82,11 +82,14 @@ libtalermerchanttesting_la_LIBADD = \ if HAVE_TALERFAKEBANK check_PROGRAMS = \ - test_merchant_api \ + test_merchant_api_cs \ + test_merchant_api_rsa \ test_kyc_api if HAVE_TWISTER -check_PROGRAMS += test_merchant_api_twisted +check_PROGRAMS += \ + test_merchant_api_twisted_cs \ + test_merchant_api_twisted_rsa endif endif @@ -95,9 +98,9 @@ TESTS = \ $(check_SCRIPTS) -test_merchant_api_twisted_SOURCES = \ +test_merchant_api_twisted_cs_SOURCES = \ test_merchant_api_twisted.c -test_merchant_api_twisted_LDADD = \ +test_merchant_api_twisted_cs_LDADD = \ $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ $(top_srcdir)/src/lib/libtalermerchant.la \ $(LIBGCRYPT_LIBS) \ @@ -109,6 +112,7 @@ test_merchant_api_twisted_LDADD = \ -ltalerexchange \ -ltalerjson \ -ltalerutil \ + -lgnunettesting \ -lgnunetjson \ -lgnunetcurl \ -lgnunetutil \ @@ -116,9 +120,51 @@ test_merchant_api_twisted_LDADD = \ -ltalertwister \ $(XLIB) -test_merchant_api_SOURCES = \ +test_merchant_api_twisted_rsa_SOURCES = \ + test_merchant_api_twisted.c +test_merchant_api_twisted_rsa_LDADD = \ + $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ + $(top_srcdir)/src/lib/libtalermerchant.la \ + $(LIBGCRYPT_LIBS) \ + -ltalertesting \ + -ltalermerchanttesting \ + -ltalertwistertesting \ + -ltalerfakebank \ + -ltalerbank \ + -ltalerexchange \ + -ltalerjson \ + -ltalerutil \ + -lgnunettesting \ + -lgnunetjson \ + -lgnunetcurl \ + -lgnunetutil \ + -ljansson \ + -ltalertwister \ + $(XLIB) + +test_merchant_api_cs_SOURCES = \ + test_merchant_api.c +test_merchant_api_cs_LDADD = \ + libtalermerchanttesting.la \ + $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ + $(top_srcdir)/src/lib/libtalermerchant.la \ + $(LIBGCRYPT_LIBS) \ + -ltalertesting \ + -ltalerfakebank \ + -ltalerbank \ + -ltalerexchange \ + -ltalerjson \ + -ltalerutil \ + -lgnunettesting \ + -lgnunetjson \ + -lgnunetcurl \ + -lgnunetutil \ + -ljansson \ + $(XLIB) + +test_merchant_api_rsa_SOURCES = \ test_merchant_api.c -test_merchant_api_LDADD = \ +test_merchant_api_rsa_LDADD = \ libtalermerchanttesting.la \ $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ $(top_srcdir)/src/lib/libtalermerchant.la \ @@ -129,6 +175,7 @@ test_merchant_api_LDADD = \ -ltalerexchange \ -ltalerjson \ -ltalerutil \ + -lgnunettesting \ -lgnunetjson \ -lgnunetcurl \ -lgnunetutil \ @@ -159,8 +206,10 @@ EXTRA_DIST = \ test_key_rotation.sh \ test_key_rotation.conf \ test_kyc_api.conf \ - test_merchant_api.conf \ - test_merchant_api_twisted.conf \ + test_merchant_api-cs.conf \ + test_merchant_api-rsa.conf \ + test_merchant_api_twisted-cs.conf \ + test_merchant_api_twisted-rsa.conf \ test_merchant_api_proxy_merchant.conf \ test_merchant_api_proxy_exchange.conf \ test_merchant_api_home/.local/share/taler/exchange-offline/master.priv \ diff --git a/src/testing/test_merchant_api-cs.conf b/src/testing/test_merchant_api-cs.conf new file mode 100644 index 00000000..006fb644 --- /dev/null +++ b/src/testing/test_merchant_api-cs.conf @@ -0,0 +1,172 @@ +# This file is in the public domain. +# +[PATHS] +# Persistent data storage for the testcase +TALER_TEST_HOME = test_merchant_api_home/ +TALER_RUNTIME_DIR = ${TMPDIR:-${TMP:-/tmp}}/${USER:-}/taler-system-runtime/ + +# Persistent data storage +TALER_DATA_HOME = $TALER_HOME/.local/share/taler/ + +# Configuration files +TALER_CONFIG_HOME = $TALER_HOME/.config/taler/ + +# Cached data, no big deal if lost +TALER_CACHE_HOME = $TALER_HOME/.cache/taler/ + +[taler] +# What currency do we use? +CURRENCY = EUR +CURRENCY_ROUND_UNIT = EUR:0.01 + +[taler-helper-crypto-rsa] +# Reduce from 1 year to speed up test +LOOKAHEAD_SIGN = 24 days + +[taler-helper-crypto-eddsa] +# Reduce from 1 year to speed up test +LOOKAHEAD_SIGN = 24 days +# Reduce from 12 weeks to ensure we have multiple +DURATION = 14 days + +[bank] +HTTP_PORT = 8082 + +########################################## +# Configuration for the merchant backend # +########################################## + +[merchant] + +# Which port do we run the backend on? (HTTP server) +PORT = 8080 + +# Which plugin (backend) do we use for the DB. +DB = postgres + +# This specifies which database the postgres backend uses. +[merchantdb-postgres] +CONFIG = postgres:///talercheck + +# Sections starting with "merchant-exchange-" specify trusted exchanges +# (by the merchant) +[merchant-exchange-test] +MASTER_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG +EXCHANGE_BASE_URL = http://localhost:8081/ +CURRENCY = EUR + + +####################################################### +# Configuration for the auditor for the testcase +####################################################### +[auditor] +BASE_URL = http://the.auditor/ + + +####################################################### +# Configuration for ??? Is this used? +####################################################### + +# Auditors must be in sections "auditor-", the rest of the section +# name could be anything. +[auditor-ezb] +# Informal name of the auditor. Just for the user. +NAME = European Central Bank + +# URL of the auditor (especially for in the future, when the +# auditor offers an automated issue reporting system). +# Not really used today. +URL = http://taler.ezb.eu/ + +# This is the important bit: the signing key of the auditor. +PUBLIC_KEY = 9QXF7XY7E9VPV47B5Z806NDFSX2VJ79SVHHD29QEQ3BG31ANHZ60 + +# Which currency is this auditor trusted for? +CURRENCY = EUR + + +################################################### +# Configuration for the exchange for the testcase # +################################################### + +[exchange] +# How to access our database +DB = postgres + +# HTTP port the exchange listens to +PORT = 8081 + +# Our public key +MASTER_PUBLIC_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG + +# Base URL of the exchange. +BASE_URL = "http://localhost:8081/" + + +[exchangedb-postgres] +CONFIG = "postgres:///talercheck" + + +[auditordb-postgres] +CONFIG = postgres:///talercheck + + +# Account of the EXCHANGE +[exchange-account-exchange] +# What is the exchange's bank account (with the "Taler Bank" demo system)? +PAYTO_URI = "payto://x-taler-bank/localhost/2" +ENABLE_DEBIT = YES +ENABLE_CREDIT = YES + +[exchange-accountcredentials-exchange] +WIRE_GATEWAY_URL = "http://localhost:8082/2/" +WIRE_GATEWAY_AUTH_METHOD = NONE + + +[coin_eur_ct_1] +value = EUR:0.01 +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 +CIPHER = CS + +[coin_eur_ct_10] +value = EUR:0.10 +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 +CIPHER = CS + +[coin_eur_1] +value = EUR:1 +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 +CIPHER = CS + +[coin_eur_5] +value = EUR:5 +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 +CIPHER = CS diff --git a/src/testing/test_merchant_api.conf b/src/testing/test_merchant_api-rsa.conf index b0f2b49e..b0f2b49e 100644 --- a/src/testing/test_merchant_api.conf +++ b/src/testing/test_merchant_api-rsa.conf diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c index 9892732d..5e746e12 100644 --- a/src/testing/test_merchant_api.c +++ b/src/testing/test_merchant_api.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014-2021 Taler Systems SA + Copyright (C) 2014-2022 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -29,6 +29,7 @@ #include <taler/taler_exchange_service.h> #include <taler/taler_json_lib.h> #include <gnunet/gnunet_util_lib.h> +#include <gnunet/gnunet_testing_lib.h> #include <microhttpd.h> #include <taler/taler_bank_service.h> #include <taler/taler_fakebank_lib.h> @@ -56,7 +57,7 @@ * Configuration file we use. One (big) configuration is used * for the various components for this test. */ -#define CONFIG_FILE "test_merchant_api.conf" +static char *config_file; #define PAYTO_I1 "payto://x-taler-bank/localhost/3" @@ -171,7 +172,7 @@ const char *order_1_forgets_3[] = { static struct TALER_TESTING_Command cmd_exec_wirewatch (const char *label) { - return TALER_TESTING_cmd_exec_wirewatch (label, CONFIG_FILE); + return TALER_TESTING_cmd_exec_wirewatch (label, config_file); } @@ -182,8 +183,8 @@ cmd_exec_wirewatch (const char *label) * @param label label to use for the command. */ #define CMD_EXEC_AGGREGATOR(label) \ - TALER_TESTING_cmd_exec_aggregator (label "-aggregator", CONFIG_FILE), \ - TALER_TESTING_cmd_exec_transfer (label "-transfer", CONFIG_FILE) + TALER_TESTING_cmd_exec_aggregator (label "-aggregator", config_file), \ + TALER_TESTING_cmd_exec_transfer (label "-transfer", config_file) /** @@ -1274,9 +1275,9 @@ run (void *cls, MHD_HTTP_NO_CONTENT, false), TALER_TESTING_cmd_exec_offline_sign_keys ("offline-sign-future-keys", - CONFIG_FILE), + config_file), TALER_TESTING_cmd_exec_offline_sign_fees ("offline-sign-fees", - CONFIG_FILE, + config_file, "EUR:0.01", "EUR:0.01"), TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys", @@ -1630,17 +1631,26 @@ int main (int argc, char *const *argv) { + char *cipher; unsigned int ret; + /* These environment variables get in the way... */ unsetenv ("XDG_DATA_HOME"); unsetenv ("XDG_CONFIG_HOME"); - GNUNET_log_setup ("test-merchant-api", + GNUNET_log_setup (argv[0], "DEBUG", NULL); - if (GNUNET_OK != TALER_TESTING_prepare_fakebank (CONFIG_FILE, - "exchange-account-exchange", - &bc)) + cipher = GNUNET_TESTING_get_testname_from_underscore (argv[0]); + GNUNET_assert (NULL != cipher); + GNUNET_asprintf (&config_file, + "test_merchant_api-%s.conf", + cipher); + GNUNET_free (cipher); + if (GNUNET_OK != + TALER_TESTING_prepare_fakebank (config_file, + "exchange-account-exchange", + &bc)) return 77; payer_payto = ("payto://x-taler-bank/localhost/" USER_ACCOUNT_NAME); @@ -1648,15 +1658,15 @@ main (int argc, merchant_payto = ("payto://x-taler-bank/localhost/" MERCHANT_ACCOUNT_NAME); if (NULL == - (merchant_url = TALER_TESTING_prepare_merchant (CONFIG_FILE))) + (merchant_url = TALER_TESTING_prepare_merchant (config_file))) return 77; GNUNET_asprintf (&merchant_url_i1a, "%sinstances/i1a/", merchant_url); - TALER_TESTING_cleanup_files (CONFIG_FILE); + TALER_TESTING_cleanup_files (config_file); - switch (TALER_TESTING_prepare_exchange (CONFIG_FILE, + switch (TALER_TESTING_prepare_exchange (config_file, GNUNET_YES, &ec)) { @@ -1665,17 +1675,15 @@ main (int argc, return 1; case GNUNET_NO: return 77; - case GNUNET_OK: - if (NULL == (merchantd = - TALER_TESTING_run_merchant (CONFIG_FILE, + TALER_TESTING_run_merchant (config_file, merchant_url))) return 1; ret = TALER_TESTING_setup_with_exchange (&run, NULL, - CONFIG_FILE); + config_file); GNUNET_OS_process_kill (merchantd, SIGTERM); GNUNET_OS_process_wait (merchantd); diff --git a/src/testing/test_merchant_api_twisted.conf b/src/testing/test_merchant_api_twisted-cs.conf index 5cc28b48..6c5416d5 100644 --- a/src/testing/test_merchant_api_twisted.conf +++ b/src/testing/test_merchant_api_twisted-cs.conf @@ -1,5 +1,5 @@ # This file is in the public domain. -@INLINE@ test_merchant_api.conf +@INLINE@ test_merchant_api-cs.conf [merchant-exchange-test] # must target the twister's http port. diff --git a/src/testing/test_merchant_api_twisted-rsa.conf b/src/testing/test_merchant_api_twisted-rsa.conf new file mode 100644 index 00000000..5a61c855 --- /dev/null +++ b/src/testing/test_merchant_api_twisted-rsa.conf @@ -0,0 +1,18 @@ +# This file is in the public domain. +@INLINE@ test_merchant_api-rsa.conf + +[merchant-exchange-test] +# must target the twister's http port. +EXCHANGE_BASE_URL = http://localhost:8888/ + +[exchange] +BASE_URL = http://localhost:8888/ + +[auditor] +BASE_URL = http://the.auditor/ + +# merchant: 8080 +# exchange: 8081 +# (Fake)bank: 8082 +# twisted-exchange: 8888 +# twisted-merchant: 8889 diff --git a/src/testing/test_merchant_api_twisted.c b/src/testing/test_merchant_api_twisted.c index ddea21a2..ea130568 100644 --- a/src/testing/test_merchant_api_twisted.c +++ b/src/testing/test_merchant_api_twisted.c @@ -32,6 +32,7 @@ #include <taler/taler_exchange_service.h> #include <taler/taler_json_lib.h> #include <gnunet/gnunet_util_lib.h> +#include <gnunet/gnunet_testing_lib.h> #include <microhttpd.h> #include <taler/taler_bank_service.h> #include <taler/taler_fakebank_lib.h> @@ -44,7 +45,7 @@ * Configuration file we use. One (big) configuration is used * for the various components for this test. */ -#define CONFIG_FILE "test_merchant_api_twisted.conf" +static char *config_file; /** * Account number of the exchange at the bank. @@ -70,13 +71,13 @@ * exchange. Not used directly here in the code (instead * used in the merchant config), but kept around for consistency. */ -#define PROXY_EXCHANGE_CONFIG_FILE \ +#define PROXY_EXCHANGE_config_file \ "test_merchant_api_proxy_exchange.conf" /** * Configuration file for the proxy between "lib" and merchant. */ -#define PROXY_MERCHANT_CONFIG_FILE \ +#define PROXY_MERCHANT_config_file \ "test_merchant_api_proxy_merchant.conf" /** @@ -150,7 +151,7 @@ static struct TALER_TESTING_ExchangeConfiguration ec; static struct TALER_TESTING_Command CMD_EXEC_WIREWATCH (const char *label) { - return TALER_TESTING_cmd_exec_wirewatch (label, CONFIG_FILE); + return TALER_TESTING_cmd_exec_wirewatch (label, config_file); } @@ -161,8 +162,8 @@ CMD_EXEC_WIREWATCH (const char *label) * @param label label to use for the command. */ #define CMD_EXEC_AGGREGATOR(label) \ - TALER_TESTING_cmd_exec_aggregator (label "-aggregator", CONFIG_FILE), \ - TALER_TESTING_cmd_exec_transfer (label "-transfer", CONFIG_FILE) + TALER_TESTING_cmd_exec_aggregator (label "-aggregator", config_file), \ + TALER_TESTING_cmd_exec_transfer (label "-transfer", config_file) /** @@ -237,21 +238,21 @@ run (void *cls, "EUR:1.00", NULL), // no sense now TALER_TESTING_cmd_delete_object ("hack-abort-1", - PROXY_MERCHANT_CONFIG_FILE, + PROXY_MERCHANT_config_file, "merchant_pub"), TALER_TESTING_cmd_merchant_order_abort ("pay-abort-1", twister_merchant_url, "deposit-simple-for-abort", MHD_HTTP_OK), TALER_TESTING_cmd_delete_object ("hack-abort-2", - PROXY_MERCHANT_CONFIG_FILE, + PROXY_MERCHANT_config_file, "refund_permissions.0.rtransaction_id"), TALER_TESTING_cmd_merchant_order_abort ("pay-abort-2", twister_merchant_url, "deposit-simple-for-abort", MHD_HTTP_OK), TALER_TESTING_cmd_modify_object_dl ("hack-abort-3", - PROXY_MERCHANT_CONFIG_FILE, + PROXY_MERCHANT_config_file, "refund_permissions.0.coin_pub", /* dummy coin. */ "8YX10E41ZWHX0X2RK4XFAXB2D3M05M1HNG14ZFZZB8M7SA4QCKCG"), @@ -260,7 +261,7 @@ run (void *cls, "deposit-simple-for-abort", MHD_HTTP_OK), TALER_TESTING_cmd_flip_download ("hack-abort-4", - PROXY_MERCHANT_CONFIG_FILE, + PROXY_MERCHANT_config_file, "refund_permissions.0.merchant_sig"), TALER_TESTING_cmd_merchant_order_abort ("pay-abort-4", twister_merchant_url, @@ -268,7 +269,7 @@ run (void *cls, MHD_HTTP_OK), /* just malforming the response. */ TALER_TESTING_cmd_malform_response ("malform-abortion", - PROXY_MERCHANT_CONFIG_FILE), + PROXY_MERCHANT_config_file), TALER_TESTING_cmd_merchant_order_abort ("pay-abort-5", twister_merchant_url, "deposit-simple-for-abort", @@ -304,7 +305,7 @@ run (void *cls, "EUR:1.00", NULL), // no sense now TALER_TESTING_cmd_flip_download ("hack-coin-history", - PROXY_MERCHANT_CONFIG_FILE, + PROXY_MERCHANT_config_file, "history.0.coin_sig"), /* Coin history check will fail, * due to coin's bad signature. */ @@ -330,9 +331,9 @@ run (void *cls, MHD_HTTP_NO_CONTENT, false), TALER_TESTING_cmd_exec_offline_sign_keys ("offline-sign-future-keys", - CONFIG_FILE), + config_file), TALER_TESTING_cmd_exec_offline_sign_fees ("offline-sign-fees", - CONFIG_FILE, + config_file, "EUR:0.01", "EUR:0.01"), TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys", @@ -380,7 +381,7 @@ run (void *cls, GNUNET_TIME_UNIT_FOREVER_TS, "EUR:6.0"), TALER_TESTING_cmd_flip_upload ("hack-claim-token", - PROXY_MERCHANT_CONFIG_FILE, + PROXY_MERCHANT_config_file, "token"), TALER_TESTING_cmd_merchant_claim_order ( "claim-1-incorrect-claim-token", @@ -404,7 +405,7 @@ run (void *cls, "EUR:4.99", NULL), TALER_TESTING_cmd_malform_response ("malform-abort-merchant-exchange", - PROXY_EXCHANGE_CONFIG_FILE), + PROXY_EXCHANGE_config_file), TALER_TESTING_cmd_merchant_order_abort ("pay-abort-1", merchant_url, "deposit-2", @@ -436,16 +437,25 @@ int main (int argc, char *const *argv) { + char *cipher; unsigned int ret; + /* These environment variables get in the way... */ unsetenv ("XDG_DATA_HOME"); unsetenv ("XDG_CONFIG_HOME"); - GNUNET_log_setup ("test-merchant-api-twisted", - "DEBUG", NULL); - - if (GNUNET_OK != TALER_TESTING_prepare_fakebank (CONFIG_FILE, - "exchange-account-exchange", - &bc)) + GNUNET_log_setup (argv[0], + "DEBUG", + NULL); + cipher = GNUNET_TESTING_get_testname_from_underscore (argv[0]); + GNUNET_assert (NULL != cipher); + GNUNET_asprintf (&config_file, + "test_merchant_api_twisted-%s.conf", + cipher); + GNUNET_free (cipher); + if (GNUNET_OK != + TALER_TESTING_prepare_fakebank (config_file, + "exchange-account-exchange", + &bc)) return 77; @@ -454,15 +464,15 @@ main (int argc, merchant_payto = ("payto://x-taler-bank/localhost/" MERCHANT_ACCOUNT_NAME); if (NULL == (merchant_url = TALER_TESTING_prepare_merchant - (CONFIG_FILE))) + (config_file))) return 77; if (NULL == (twister_exchange_url = TALER_TWISTER_prepare_twister - (PROXY_EXCHANGE_CONFIG_FILE))) + (PROXY_EXCHANGE_config_file))) return 77; if (NULL == (twister_merchant_url = TALER_TWISTER_prepare_twister - (PROXY_MERCHANT_CONFIG_FILE))) + (PROXY_MERCHANT_config_file))) return 77; twister_merchant_url_instance_nonexistent = TALER_url_join ( @@ -470,9 +480,9 @@ main (int argc, twister_merchant_url_instance_tor = TALER_url_join ( twister_merchant_url, "instances/tor/", NULL); - TALER_TESTING_cleanup_files (CONFIG_FILE); + TALER_TESTING_cleanup_files (config_file); - switch (TALER_TESTING_prepare_exchange (CONFIG_FILE, + switch (TALER_TESTING_prepare_exchange (config_file, GNUNET_YES, &ec)) { @@ -481,25 +491,24 @@ main (int argc, return 1; case GNUNET_NO: return 77; - case GNUNET_OK: if (NULL == (merchantd = TALER_TESTING_run_merchant - (CONFIG_FILE, merchant_url))) + (config_file, merchant_url))) // 1 is fine; after all this is merchant test cases. return 1; if (NULL == (twisterexchanged = TALER_TWISTER_run_twister - (PROXY_EXCHANGE_CONFIG_FILE))) + (PROXY_EXCHANGE_config_file))) return 77; if (NULL == (twistermerchantd = TALER_TWISTER_run_twister - (PROXY_MERCHANT_CONFIG_FILE))) + (PROXY_MERCHANT_config_file))) return 77; /* Run the exchange and schedule 'run()' */ ret = TALER_TESTING_setup_with_exchange (&run, NULL, - CONFIG_FILE); + config_file); purge_process (merchantd); purge_process (twisterexchanged); purge_process (twistermerchantd); |