split tests by rsa/cs
This commit is contained in:
parent
a67786078b
commit
9d40bd5a1e
@ -1 +1 @@
|
|||||||
Subproject commit 6b74d0faa173bbb220cdd82dcf3915dadd241e1e
|
Subproject commit 3a71278a2aab67f9a1888af172b507d6e08364cf
|
9
src/testing/.gitignore
vendored
9
src/testing/.gitignore
vendored
@ -1,13 +1,16 @@
|
|||||||
test_auditor_api_version
|
test_auditor_api_version_cs
|
||||||
|
test_auditor_api_version_rsa
|
||||||
test_bank_api_with_fakebank
|
test_bank_api_with_fakebank
|
||||||
test_bank_api_with_fakebank_twisted
|
test_bank_api_with_fakebank_twisted
|
||||||
test_bank_api_with_pybank
|
test_bank_api_with_pybank
|
||||||
test_bank_api_with_pybank_twisted
|
test_bank_api_with_pybank_twisted
|
||||||
test_taler_exchange_aggregator-postgres
|
test_taler_exchange_aggregator-postgres
|
||||||
test_taler_exchange_wirewatch-postgres
|
test_taler_exchange_wirewatch-postgres
|
||||||
test_exchange_api_revocation
|
test_exchange_api_revocation_cs
|
||||||
|
test_exchange_api_revocation_rsa
|
||||||
report*
|
report*
|
||||||
test_exchange_management_api
|
test_exchange_management_api_cs
|
||||||
|
test_exchange_management_api_rsa
|
||||||
test_exchange_api_home/.local/share/taler/crypto-eddsa/
|
test_exchange_api_home/.local/share/taler/crypto-eddsa/
|
||||||
test_exchange_api_home/.local/share/taler/crypto-rsa/
|
test_exchange_api_home/.local/share/taler/crypto-rsa/
|
||||||
test_exchange_api_home/.local/share/taler/exchange/offline-keys/secm_tofus.priv
|
test_exchange_api_home/.local/share/taler/exchange/offline-keys/secm_tofus.priv
|
||||||
|
@ -114,16 +114,23 @@ AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export PATH=
|
|||||||
|
|
||||||
.NOTPARALLEL:
|
.NOTPARALLEL:
|
||||||
check_PROGRAMS = \
|
check_PROGRAMS = \
|
||||||
test_auditor_api \
|
test_auditor_api_cs \
|
||||||
test_auditor_api_version \
|
test_auditor_api_rsa \
|
||||||
|
test_auditor_api_version_rsa \
|
||||||
|
test_auditor_api_version_cs \
|
||||||
test_bank_api_with_fakebank \
|
test_bank_api_with_fakebank \
|
||||||
test_bank_api_with_pybank \
|
test_bank_api_with_pybank \
|
||||||
test_bank_api_with_nexus \
|
test_bank_api_with_nexus \
|
||||||
test_exchange_api \
|
test_exchange_api_cs \
|
||||||
test_exchange_api_keys_cherry_picking \
|
test_exchange_api_rsa \
|
||||||
test_exchange_api_revocation \
|
test_exchange_api_keys_cherry_picking_cs \
|
||||||
test_exchange_api_overlapping_keys_bug \
|
test_exchange_api_keys_cherry_picking_rsa \
|
||||||
test_exchange_management_api \
|
test_exchange_api_revocation_cs \
|
||||||
|
test_exchange_api_revocation_rsa \
|
||||||
|
test_exchange_api_overlapping_keys_bug_cs \
|
||||||
|
test_exchange_api_overlapping_keys_bug_rsa \
|
||||||
|
test_exchange_management_api_cs \
|
||||||
|
test_exchange_management_api_rsa \
|
||||||
test_kyc_api \
|
test_kyc_api \
|
||||||
test_taler_exchange_aggregator-postgres \
|
test_taler_exchange_aggregator-postgres \
|
||||||
test_taler_exchange_wirewatch-postgres
|
test_taler_exchange_wirewatch-postgres
|
||||||
@ -139,9 +146,25 @@ endif
|
|||||||
TESTS = \
|
TESTS = \
|
||||||
$(check_PROGRAMS)
|
$(check_PROGRAMS)
|
||||||
|
|
||||||
test_auditor_api_SOURCES = \
|
test_auditor_api_cs_SOURCES = \
|
||||||
test_auditor_api.c
|
test_auditor_api.c
|
||||||
test_auditor_api_LDADD = \
|
test_auditor_api_cs_LDADD = \
|
||||||
|
$(top_builddir)/src/lib/libtalerauditor.la \
|
||||||
|
libtalertesting.la \
|
||||||
|
$(top_builddir)/src/lib/libtalerexchange.la \
|
||||||
|
$(LIBGCRYPT_LIBS) \
|
||||||
|
$(top_builddir)/src/bank-lib/libtalerfakebank.la \
|
||||||
|
$(top_builddir)/src/bank-lib/libtalerbank.la \
|
||||||
|
$(top_builddir)/src/json/libtalerjson.la \
|
||||||
|
$(top_builddir)/src/util/libtalerutil.la \
|
||||||
|
-lgnunetcurl \
|
||||||
|
-lgnunetutil \
|
||||||
|
-ljansson \
|
||||||
|
$(XLIB)
|
||||||
|
|
||||||
|
test_auditor_api_rsa_SOURCES = \
|
||||||
|
test_auditor_api.c
|
||||||
|
test_auditor_api_rsa_LDADD = \
|
||||||
$(top_builddir)/src/lib/libtalerauditor.la \
|
$(top_builddir)/src/lib/libtalerauditor.la \
|
||||||
libtalertesting.la \
|
libtalertesting.la \
|
||||||
$(top_builddir)/src/lib/libtalerexchange.la \
|
$(top_builddir)/src/lib/libtalerexchange.la \
|
||||||
@ -156,9 +179,21 @@ test_auditor_api_LDADD = \
|
|||||||
$(XLIB)
|
$(XLIB)
|
||||||
|
|
||||||
|
|
||||||
test_auditor_api_version_SOURCES = \
|
test_auditor_api_version_cs_SOURCES = \
|
||||||
test_auditor_api_version.c
|
test_auditor_api_version.c
|
||||||
test_auditor_api_version_LDADD = \
|
test_auditor_api_version_cs_LDADD = \
|
||||||
|
libtalertesting.la \
|
||||||
|
$(top_builddir)/src/lib/libtalerauditor.la \
|
||||||
|
$(LIBGCRYPT_LIBS) \
|
||||||
|
$(top_builddir)/src/util/libtalerutil.la \
|
||||||
|
-lgnunetcurl \
|
||||||
|
-lgnunetutil \
|
||||||
|
-ljansson \
|
||||||
|
$(XLIB)
|
||||||
|
|
||||||
|
test_auditor_api_version_rsa_SOURCES = \
|
||||||
|
test_auditor_api_version.c
|
||||||
|
test_auditor_api_version_rsa_LDADD = \
|
||||||
libtalertesting.la \
|
libtalertesting.la \
|
||||||
$(top_builddir)/src/lib/libtalerauditor.la \
|
$(top_builddir)/src/lib/libtalerauditor.la \
|
||||||
$(LIBGCRYPT_LIBS) \
|
$(LIBGCRYPT_LIBS) \
|
||||||
@ -195,9 +230,9 @@ test_bank_api_with_pybank_LDADD = \
|
|||||||
$(top_builddir)/src/bank-lib/libtalerbank.la \
|
$(top_builddir)/src/bank-lib/libtalerbank.la \
|
||||||
$(XLIB)
|
$(XLIB)
|
||||||
|
|
||||||
test_exchange_api_SOURCES = \
|
test_exchange_api_cs_SOURCES = \
|
||||||
test_exchange_api.c
|
test_exchange_api.c
|
||||||
test_exchange_api_LDADD = \
|
test_exchange_api_cs_LDADD = \
|
||||||
libtalertesting.la \
|
libtalertesting.la \
|
||||||
$(top_builddir)/src/lib/libtalerexchange.la \
|
$(top_builddir)/src/lib/libtalerexchange.la \
|
||||||
$(LIBGCRYPT_LIBS) \
|
$(LIBGCRYPT_LIBS) \
|
||||||
@ -210,18 +245,9 @@ test_exchange_api_LDADD = \
|
|||||||
-ljansson \
|
-ljansson \
|
||||||
$(XLIB)
|
$(XLIB)
|
||||||
|
|
||||||
test_exchange_management_api_SOURCES = \
|
test_exchange_api_rsa_SOURCES = \
|
||||||
test_exchange_management_api.c
|
test_exchange_api.c
|
||||||
test_exchange_management_api_LDADD = \
|
test_exchange_api_rsa_LDADD = \
|
||||||
libtalertesting.la \
|
|
||||||
$(top_builddir)/src/lib/libtalerexchange.la \
|
|
||||||
$(top_builddir)/src/util/libtalerutil.la \
|
|
||||||
-lgnunetutil \
|
|
||||||
$(XLIB)
|
|
||||||
|
|
||||||
test_exchange_api_revocation_SOURCES = \
|
|
||||||
test_exchange_api_revocation.c
|
|
||||||
test_exchange_api_revocation_LDADD = \
|
|
||||||
libtalertesting.la \
|
libtalertesting.la \
|
||||||
$(top_builddir)/src/lib/libtalerexchange.la \
|
$(top_builddir)/src/lib/libtalerexchange.la \
|
||||||
$(LIBGCRYPT_LIBS) \
|
$(LIBGCRYPT_LIBS) \
|
||||||
@ -234,9 +260,9 @@ test_exchange_api_revocation_LDADD = \
|
|||||||
-ljansson \
|
-ljansson \
|
||||||
$(XLIB)
|
$(XLIB)
|
||||||
|
|
||||||
test_exchange_api_keys_cherry_picking_SOURCES = \
|
test_exchange_api_keys_cherry_picking_cs_SOURCES = \
|
||||||
test_exchange_api_keys_cherry_picking.c
|
test_exchange_api_keys_cherry_picking.c
|
||||||
test_exchange_api_keys_cherry_picking_LDADD = \
|
test_exchange_api_keys_cherry_picking_cs_LDADD = \
|
||||||
libtalertesting.la \
|
libtalertesting.la \
|
||||||
$(top_builddir)/src/lib/libtalerexchange.la \
|
$(top_builddir)/src/lib/libtalerexchange.la \
|
||||||
$(LIBGCRYPT_LIBS) \
|
$(LIBGCRYPT_LIBS) \
|
||||||
@ -248,9 +274,9 @@ test_exchange_api_keys_cherry_picking_LDADD = \
|
|||||||
-ljansson \
|
-ljansson \
|
||||||
$(XLIB)
|
$(XLIB)
|
||||||
|
|
||||||
test_exchange_api_overlapping_keys_bug_SOURCES = \
|
test_exchange_api_keys_cherry_picking_rsa_SOURCES = \
|
||||||
test_exchange_api_overlapping_keys_bug.c
|
test_exchange_api_keys_cherry_picking.c
|
||||||
test_exchange_api_overlapping_keys_bug_LDADD = \
|
test_exchange_api_keys_cherry_picking_rsa_LDADD = \
|
||||||
libtalertesting.la \
|
libtalertesting.la \
|
||||||
$(top_builddir)/src/lib/libtalerexchange.la \
|
$(top_builddir)/src/lib/libtalerexchange.la \
|
||||||
$(LIBGCRYPT_LIBS) \
|
$(LIBGCRYPT_LIBS) \
|
||||||
@ -262,6 +288,84 @@ test_exchange_api_overlapping_keys_bug_LDADD = \
|
|||||||
-ljansson \
|
-ljansson \
|
||||||
$(XLIB)
|
$(XLIB)
|
||||||
|
|
||||||
|
test_exchange_api_revocation_cs_SOURCES = \
|
||||||
|
test_exchange_api_revocation.c
|
||||||
|
test_exchange_api_revocation_cs_LDADD = \
|
||||||
|
libtalertesting.la \
|
||||||
|
$(top_builddir)/src/lib/libtalerexchange.la \
|
||||||
|
$(LIBGCRYPT_LIBS) \
|
||||||
|
$(top_builddir)/src/bank-lib/libtalerfakebank.la \
|
||||||
|
$(top_builddir)/src/bank-lib/libtalerbank.la \
|
||||||
|
$(top_builddir)/src/json/libtalerjson.la \
|
||||||
|
$(top_builddir)/src/util/libtalerutil.la \
|
||||||
|
-lgnunetcurl \
|
||||||
|
-lgnunetutil \
|
||||||
|
-ljansson \
|
||||||
|
$(XLIB)
|
||||||
|
|
||||||
|
test_exchange_api_revocation_rsa_SOURCES = \
|
||||||
|
test_exchange_api_revocation.c
|
||||||
|
test_exchange_api_revocation_rsa_LDADD = \
|
||||||
|
libtalertesting.la \
|
||||||
|
$(top_builddir)/src/lib/libtalerexchange.la \
|
||||||
|
$(LIBGCRYPT_LIBS) \
|
||||||
|
$(top_builddir)/src/bank-lib/libtalerfakebank.la \
|
||||||
|
$(top_builddir)/src/bank-lib/libtalerbank.la \
|
||||||
|
$(top_builddir)/src/json/libtalerjson.la \
|
||||||
|
$(top_builddir)/src/util/libtalerutil.la \
|
||||||
|
-lgnunetcurl \
|
||||||
|
-lgnunetutil \
|
||||||
|
-ljansson \
|
||||||
|
$(XLIB)
|
||||||
|
|
||||||
|
|
||||||
|
test_exchange_api_overlapping_keys_bug_cs_SOURCES = \
|
||||||
|
test_exchange_api_overlapping_keys_bug.c
|
||||||
|
test_exchange_api_overlapping_keys_bug_cs_LDADD = \
|
||||||
|
libtalertesting.la \
|
||||||
|
$(top_builddir)/src/lib/libtalerexchange.la \
|
||||||
|
$(LIBGCRYPT_LIBS) \
|
||||||
|
$(top_builddir)/src/json/libtalerjson.la \
|
||||||
|
$(top_builddir)/src/util/libtalerutil.la \
|
||||||
|
$(top_builddir)/src/bank-lib/libtalerbank.la \
|
||||||
|
-lgnunetcurl \
|
||||||
|
-lgnunetutil \
|
||||||
|
-ljansson \
|
||||||
|
$(XLIB)
|
||||||
|
|
||||||
|
test_exchange_api_overlapping_keys_bug_rsa_SOURCES = \
|
||||||
|
test_exchange_api_overlapping_keys_bug.c
|
||||||
|
test_exchange_api_overlapping_keys_bug_rsa_LDADD = \
|
||||||
|
libtalertesting.la \
|
||||||
|
$(top_builddir)/src/lib/libtalerexchange.la \
|
||||||
|
$(LIBGCRYPT_LIBS) \
|
||||||
|
$(top_builddir)/src/json/libtalerjson.la \
|
||||||
|
$(top_builddir)/src/util/libtalerutil.la \
|
||||||
|
$(top_builddir)/src/bank-lib/libtalerbank.la \
|
||||||
|
-lgnunetcurl \
|
||||||
|
-lgnunetutil \
|
||||||
|
-ljansson \
|
||||||
|
$(XLIB)
|
||||||
|
|
||||||
|
test_exchange_management_api_cs_SOURCES = \
|
||||||
|
test_exchange_management_api.c
|
||||||
|
test_exchange_management_api_cs_LDADD = \
|
||||||
|
libtalertesting.la \
|
||||||
|
$(top_builddir)/src/lib/libtalerexchange.la \
|
||||||
|
$(top_builddir)/src/util/libtalerutil.la \
|
||||||
|
-lgnunetutil \
|
||||||
|
$(XLIB)
|
||||||
|
|
||||||
|
test_exchange_management_api_rsa_SOURCES = \
|
||||||
|
test_exchange_management_api.c
|
||||||
|
test_exchange_management_api_rsa_LDADD = \
|
||||||
|
libtalertesting.la \
|
||||||
|
$(top_builddir)/src/lib/libtalerexchange.la \
|
||||||
|
$(top_builddir)/src/util/libtalerutil.la \
|
||||||
|
-lgnunetutil \
|
||||||
|
$(XLIB)
|
||||||
|
|
||||||
|
|
||||||
test_taler_exchange_aggregator_postgres_SOURCES = \
|
test_taler_exchange_aggregator_postgres_SOURCES = \
|
||||||
test_taler_exchange_aggregator.c
|
test_taler_exchange_aggregator.c
|
||||||
test_taler_exchange_aggregator_postgres_LDADD = \
|
test_taler_exchange_aggregator_postgres_LDADD = \
|
||||||
|
@ -39,10 +39,9 @@
|
|||||||
* Configuration file we use. One (big) configuration is used
|
* Configuration file we use. One (big) configuration is used
|
||||||
* for the various components for this test.
|
* for the various components for this test.
|
||||||
*/
|
*/
|
||||||
#define CONFIG_FILE "test_auditor_api.conf"
|
static char *config_file;
|
||||||
|
|
||||||
#define CONFIG_FILE_EXPIRE_RESERVE_NOW \
|
static char *config_file_expire_reserve_now;
|
||||||
"test_auditor_api_expire_reserve_now.conf"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exchange configuration data.
|
* Exchange configuration data.
|
||||||
@ -61,7 +60,7 @@ static struct TALER_TESTING_BankConfiguration bc;
|
|||||||
* @param label label to use for the command.
|
* @param label label to use for the command.
|
||||||
*/
|
*/
|
||||||
#define CMD_EXEC_WIREWATCH(label) \
|
#define CMD_EXEC_WIREWATCH(label) \
|
||||||
TALER_TESTING_cmd_exec_wirewatch (label, CONFIG_FILE)
|
TALER_TESTING_cmd_exec_wirewatch (label, config_file)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the taler-exchange-aggregator, closer and transfer commands with
|
* Execute the taler-exchange-aggregator, closer and transfer commands with
|
||||||
@ -71,8 +70,8 @@ static struct TALER_TESTING_BankConfiguration bc;
|
|||||||
*/
|
*/
|
||||||
#define CMD_EXEC_AGGREGATOR(label) \
|
#define CMD_EXEC_AGGREGATOR(label) \
|
||||||
TALER_TESTING_cmd_sleep (label "-sleep", 1), \
|
TALER_TESTING_cmd_sleep (label "-sleep", 1), \
|
||||||
TALER_TESTING_cmd_exec_aggregator (label, CONFIG_FILE), \
|
TALER_TESTING_cmd_exec_aggregator (label, config_file), \
|
||||||
TALER_TESTING_cmd_exec_transfer (label, CONFIG_FILE)
|
TALER_TESTING_cmd_exec_transfer (label, config_file)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run wire transfer of funds from some user's account to the
|
* Run wire transfer of funds from some user's account to the
|
||||||
@ -92,7 +91,7 @@ static struct TALER_TESTING_BankConfiguration bc;
|
|||||||
* @param label label to use for the command.
|
* @param label label to use for the command.
|
||||||
*/
|
*/
|
||||||
#define CMD_RUN_AUDITOR(label) \
|
#define CMD_RUN_AUDITOR(label) \
|
||||||
TALER_TESTING_cmd_exec_auditor (label, CONFIG_FILE)
|
TALER_TESTING_cmd_exec_auditor (label, config_file)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -406,7 +405,7 @@ run (void *cls,
|
|||||||
TALER_TESTING_cmd_revoke ("revoke-1",
|
TALER_TESTING_cmd_revoke ("revoke-1",
|
||||||
MHD_HTTP_OK,
|
MHD_HTTP_OK,
|
||||||
"recoup-withdraw-coin-1",
|
"recoup-withdraw-coin-1",
|
||||||
CONFIG_FILE),
|
config_file),
|
||||||
TALER_TESTING_cmd_recoup ("recoup-1",
|
TALER_TESTING_cmd_recoup ("recoup-1",
|
||||||
MHD_HTTP_OK,
|
MHD_HTTP_OK,
|
||||||
"recoup-withdraw-coin-1",
|
"recoup-withdraw-coin-1",
|
||||||
@ -426,9 +425,9 @@ run (void *cls,
|
|||||||
CMD_TRANSFER_TO_EXCHANGE ("short-lived-reserve",
|
CMD_TRANSFER_TO_EXCHANGE ("short-lived-reserve",
|
||||||
"EUR:5.01"),
|
"EUR:5.01"),
|
||||||
TALER_TESTING_cmd_exec_wirewatch ("short-lived-aggregation",
|
TALER_TESTING_cmd_exec_wirewatch ("short-lived-aggregation",
|
||||||
CONFIG_FILE_EXPIRE_RESERVE_NOW),
|
config_file_expire_reserve_now),
|
||||||
TALER_TESTING_cmd_exec_aggregator ("close-reserves",
|
TALER_TESTING_cmd_exec_aggregator ("close-reserves",
|
||||||
CONFIG_FILE_EXPIRE_RESERVE_NOW),
|
config_file_expire_reserve_now),
|
||||||
/**
|
/**
|
||||||
* Fill reserve with EUR:2.02, as withdraw fee is 1 ct per
|
* Fill reserve with EUR:2.02, as withdraw fee is 1 ct per
|
||||||
* config, then withdraw two coin, partially spend one, and
|
* config, then withdraw two coin, partially spend one, and
|
||||||
@ -466,7 +465,7 @@ run (void *cls,
|
|||||||
TALER_TESTING_cmd_revoke ("revoke-2",
|
TALER_TESTING_cmd_revoke ("revoke-2",
|
||||||
MHD_HTTP_OK,
|
MHD_HTTP_OK,
|
||||||
"recoup-withdraw-coin-2a",
|
"recoup-withdraw-coin-2a",
|
||||||
CONFIG_FILE),
|
config_file),
|
||||||
TALER_TESTING_cmd_recoup ("recoup-2",
|
TALER_TESTING_cmd_recoup ("recoup-2",
|
||||||
MHD_HTTP_OK,
|
MHD_HTTP_OK,
|
||||||
"recoup-withdraw-coin-2a",
|
"recoup-withdraw-coin-2a",
|
||||||
@ -631,7 +630,7 @@ run (void *cls,
|
|||||||
|
|
||||||
struct TALER_TESTING_Command commands[] = {
|
struct TALER_TESTING_Command commands[] = {
|
||||||
TALER_TESTING_cmd_exec_offline_sign_fees ("offline-sign-fees",
|
TALER_TESTING_cmd_exec_offline_sign_fees ("offline-sign-fees",
|
||||||
CONFIG_FILE,
|
config_file,
|
||||||
"EUR:0.01",
|
"EUR:0.01",
|
||||||
"EUR:0.01"),
|
"EUR:0.01"),
|
||||||
TALER_TESTING_cmd_auditor_add ("add-auditor-OK",
|
TALER_TESTING_cmd_auditor_add ("add-auditor-OK",
|
||||||
@ -642,11 +641,11 @@ run (void *cls,
|
|||||||
MHD_HTTP_NO_CONTENT,
|
MHD_HTTP_NO_CONTENT,
|
||||||
false),
|
false),
|
||||||
TALER_TESTING_cmd_exec_offline_sign_keys ("offline-sign-future-keys",
|
TALER_TESTING_cmd_exec_offline_sign_keys ("offline-sign-future-keys",
|
||||||
CONFIG_FILE),
|
config_file),
|
||||||
TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys",
|
TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys",
|
||||||
2),
|
2),
|
||||||
TALER_TESTING_cmd_exec_auditor_offline ("auditor-offline",
|
TALER_TESTING_cmd_exec_auditor_offline ("auditor-offline",
|
||||||
CONFIG_FILE),
|
config_file),
|
||||||
CMD_RUN_AUDITOR ("virgin-auditor"),
|
CMD_RUN_AUDITOR ("virgin-auditor"),
|
||||||
TALER_TESTING_cmd_exchanges_with_url ("check-exchange",
|
TALER_TESTING_cmd_exchanges_with_url ("check-exchange",
|
||||||
MHD_HTTP_OK,
|
MHD_HTTP_OK,
|
||||||
@ -682,25 +681,36 @@ int
|
|||||||
main (int argc,
|
main (int argc,
|
||||||
char *const *argv)
|
char *const *argv)
|
||||||
{
|
{
|
||||||
|
const char *cipher;
|
||||||
|
|
||||||
(void) argc;
|
(void) argc;
|
||||||
(void) argv;
|
|
||||||
/* These environment variables get in the way... */
|
/* These environment variables get in the way... */
|
||||||
unsetenv ("XDG_DATA_HOME");
|
unsetenv ("XDG_DATA_HOME");
|
||||||
unsetenv ("XDG_CONFIG_HOME");
|
unsetenv ("XDG_CONFIG_HOME");
|
||||||
GNUNET_log_setup ("test-auditor-api",
|
GNUNET_log_setup (argv[0],
|
||||||
"INFO",
|
"INFO",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/* Check fakebank port is available and get configuration data. */
|
/* Check fakebank port is available and get configuration data. */
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_TESTING_prepare_fakebank (CONFIG_FILE,
|
TALER_TESTING_prepare_fakebank (config_file,
|
||||||
"exchange-account-2",
|
"exchange-account-2",
|
||||||
&bc))
|
&bc))
|
||||||
return 77;
|
return 77;
|
||||||
TALER_TESTING_cleanup_files (CONFIG_FILE);
|
cipher = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
|
||||||
|
GNUNET_assert (NULL != cipher);
|
||||||
|
GNUNET_asprintf (&config_file,
|
||||||
|
"test_auditor_api-%s.conf",
|
||||||
|
cipher);
|
||||||
|
GNUNET_asprintf (&config_file_expire_reserve_now,
|
||||||
|
"test_auditor_api_expire_reserve_now-%s.conf",
|
||||||
|
cipher);
|
||||||
|
|
||||||
|
TALER_TESTING_cleanup_files (config_file);
|
||||||
/* @helpers. Run keyup, create tables, ... Note: it
|
/* @helpers. Run keyup, create tables, ... Note: it
|
||||||
* fetches the port number from config in order to see
|
* fetches the port number from config in order to see
|
||||||
* if it's available. */
|
* if it's available. */
|
||||||
switch (TALER_TESTING_prepare_exchange (CONFIG_FILE,
|
switch (TALER_TESTING_prepare_exchange (config_file,
|
||||||
GNUNET_YES,
|
GNUNET_YES,
|
||||||
&ec))
|
&ec))
|
||||||
{
|
{
|
||||||
@ -717,7 +727,7 @@ main (int argc,
|
|||||||
*/
|
*/
|
||||||
TALER_TESTING_auditor_setup (&run,
|
TALER_TESTING_auditor_setup (&run,
|
||||||
NULL,
|
NULL,
|
||||||
CONFIG_FILE))
|
config_file))
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -38,10 +38,9 @@
|
|||||||
* Configuration file we use. One (big) configuration is used
|
* Configuration file we use. One (big) configuration is used
|
||||||
* for the various components for this test.
|
* for the various components for this test.
|
||||||
*/
|
*/
|
||||||
#define CONFIG_FILE "test_exchange_api.conf"
|
static char *config_file;
|
||||||
|
|
||||||
#define CONFIG_FILE_EXPIRE_RESERVE_NOW \
|
static char *config_file_expire_reserve_now;
|
||||||
"test_exchange_api_expire_reserve_now.conf"
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -62,7 +61,7 @@ static struct TALER_TESTING_BankConfiguration bc;
|
|||||||
* @param label label to use for the command.
|
* @param label label to use for the command.
|
||||||
*/
|
*/
|
||||||
#define CMD_EXEC_WIREWATCH(label) \
|
#define CMD_EXEC_WIREWATCH(label) \
|
||||||
TALER_TESTING_cmd_exec_wirewatch (label, CONFIG_FILE)
|
TALER_TESTING_cmd_exec_wirewatch (label, config_file)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the taler-exchange-aggregator, closer and transfer commands with
|
* Execute the taler-exchange-aggregator, closer and transfer commands with
|
||||||
@ -71,8 +70,8 @@ static struct TALER_TESTING_BankConfiguration bc;
|
|||||||
* @param label label to use for the command.
|
* @param label label to use for the command.
|
||||||
*/
|
*/
|
||||||
#define CMD_EXEC_AGGREGATOR(label) \
|
#define CMD_EXEC_AGGREGATOR(label) \
|
||||||
TALER_TESTING_cmd_exec_aggregator (label "-aggregator", CONFIG_FILE), \
|
TALER_TESTING_cmd_exec_aggregator (label "-aggregator", config_file), \
|
||||||
TALER_TESTING_cmd_exec_transfer (label "-transfer", CONFIG_FILE)
|
TALER_TESTING_cmd_exec_transfer (label "-transfer", config_file)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -679,7 +678,7 @@ run (void *cls,
|
|||||||
TALER_TESTING_cmd_revoke ("revoke-0-EUR:5",
|
TALER_TESTING_cmd_revoke ("revoke-0-EUR:5",
|
||||||
MHD_HTTP_OK,
|
MHD_HTTP_OK,
|
||||||
"recoup-withdraw-coin-1",
|
"recoup-withdraw-coin-1",
|
||||||
CONFIG_FILE),
|
config_file),
|
||||||
/* Recoup coin to reserve */
|
/* Recoup coin to reserve */
|
||||||
TALER_TESTING_cmd_recoup ("recoup-1",
|
TALER_TESTING_cmd_recoup ("recoup-1",
|
||||||
MHD_HTTP_OK,
|
MHD_HTTP_OK,
|
||||||
@ -779,14 +778,14 @@ run (void *cls,
|
|||||||
bc.exchange_payto,
|
bc.exchange_payto,
|
||||||
"short-lived-reserve"),
|
"short-lived-reserve"),
|
||||||
TALER_TESTING_cmd_exec_wirewatch ("short-lived-aggregation",
|
TALER_TESTING_cmd_exec_wirewatch ("short-lived-aggregation",
|
||||||
CONFIG_FILE_EXPIRE_RESERVE_NOW),
|
config_file_expire_reserve_now),
|
||||||
TALER_TESTING_cmd_exec_closer ("close-reserves",
|
TALER_TESTING_cmd_exec_closer ("close-reserves",
|
||||||
CONFIG_FILE_EXPIRE_RESERVE_NOW,
|
config_file_expire_reserve_now,
|
||||||
"EUR:5",
|
"EUR:5",
|
||||||
"EUR:0.01",
|
"EUR:0.01",
|
||||||
"short-lived-reserve"),
|
"short-lived-reserve"),
|
||||||
TALER_TESTING_cmd_exec_transfer ("close-reserves-transfer",
|
TALER_TESTING_cmd_exec_transfer ("close-reserves-transfer",
|
||||||
CONFIG_FILE_EXPIRE_RESERVE_NOW),
|
config_file_expire_reserve_now),
|
||||||
|
|
||||||
TALER_TESTING_cmd_status ("short-lived-status",
|
TALER_TESTING_cmd_status ("short-lived-status",
|
||||||
"short-lived-reserve",
|
"short-lived-reserve",
|
||||||
@ -836,7 +835,7 @@ run (void *cls,
|
|||||||
TALER_TESTING_cmd_revoke ("revoke-1-EUR:1",
|
TALER_TESTING_cmd_revoke ("revoke-1-EUR:1",
|
||||||
MHD_HTTP_OK,
|
MHD_HTTP_OK,
|
||||||
"recoup-withdraw-coin-2a",
|
"recoup-withdraw-coin-2a",
|
||||||
CONFIG_FILE),
|
config_file),
|
||||||
/* Check recoup is failing for the coin with the reused coin key */
|
/* Check recoup is failing for the coin with the reused coin key */
|
||||||
TALER_TESTING_cmd_recoup ("recoup-2x",
|
TALER_TESTING_cmd_recoup ("recoup-2x",
|
||||||
MHD_HTTP_CONFLICT,
|
MHD_HTTP_CONFLICT,
|
||||||
@ -1047,10 +1046,10 @@ run (void *cls,
|
|||||||
"EUR:20");
|
"EUR:20");
|
||||||
reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 1]
|
reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 1]
|
||||||
= TALER_TESTING_cmd_exec_wirewatch ("reserve-open-close-wirewatch",
|
= TALER_TESTING_cmd_exec_wirewatch ("reserve-open-close-wirewatch",
|
||||||
CONFIG_FILE_EXPIRE_RESERVE_NOW);
|
config_file_expire_reserve_now);
|
||||||
reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 2]
|
reserve_open_close[(i * RESERVE_OPEN_CLOSE_CHUNK) + 2]
|
||||||
= TALER_TESTING_cmd_exec_closer ("reserve-open-close-aggregation",
|
= TALER_TESTING_cmd_exec_closer ("reserve-open-close-aggregation",
|
||||||
CONFIG_FILE_EXPIRE_RESERVE_NOW,
|
config_file_expire_reserve_now,
|
||||||
"EUR:19.99",
|
"EUR:19.99",
|
||||||
"EUR:0.01",
|
"EUR:0.01",
|
||||||
"reserve-open-close-key");
|
"reserve-open-close-key");
|
||||||
@ -1074,9 +1073,9 @@ run (void *cls,
|
|||||||
MHD_HTTP_NO_CONTENT,
|
MHD_HTTP_NO_CONTENT,
|
||||||
false),
|
false),
|
||||||
TALER_TESTING_cmd_exec_offline_sign_keys ("offline-sign-future-keys",
|
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",
|
TALER_TESTING_cmd_exec_offline_sign_fees ("offline-sign-fees",
|
||||||
CONFIG_FILE,
|
config_file,
|
||||||
"EUR:0.01",
|
"EUR:0.01",
|
||||||
"EUR:0.01"),
|
"EUR:0.01"),
|
||||||
TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys",
|
TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys",
|
||||||
@ -1123,25 +1122,34 @@ int
|
|||||||
main (int argc,
|
main (int argc,
|
||||||
char *const *argv)
|
char *const *argv)
|
||||||
{
|
{
|
||||||
|
const char *cipher;
|
||||||
|
|
||||||
(void) argc;
|
(void) argc;
|
||||||
(void) argv;
|
|
||||||
/* These environment variables get in the way... */
|
/* These environment variables get in the way... */
|
||||||
unsetenv ("XDG_DATA_HOME");
|
unsetenv ("XDG_DATA_HOME");
|
||||||
unsetenv ("XDG_CONFIG_HOME");
|
unsetenv ("XDG_CONFIG_HOME");
|
||||||
GNUNET_log_setup ("test-exchange-api",
|
GNUNET_log_setup (argv[0],
|
||||||
"INFO",
|
"INFO",
|
||||||
NULL);
|
NULL);
|
||||||
|
cipher = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
|
||||||
|
GNUNET_assert (NULL != cipher);
|
||||||
|
GNUNET_asprintf (&config_file,
|
||||||
|
"test_exchange_api-%s.conf",
|
||||||
|
cipher);
|
||||||
|
GNUNET_asprintf (&config_file_expire_reserve_now,
|
||||||
|
"test_exchange_api_expire_reserve_now-%s.conf",
|
||||||
|
cipher);
|
||||||
/* Check fakebank port is available and get config */
|
/* Check fakebank port is available and get config */
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_TESTING_prepare_fakebank (CONFIG_FILE,
|
TALER_TESTING_prepare_fakebank (config_file,
|
||||||
"exchange-account-2",
|
"exchange-account-2",
|
||||||
&bc))
|
&bc))
|
||||||
return 77;
|
return 77;
|
||||||
TALER_TESTING_cleanup_files (CONFIG_FILE);
|
TALER_TESTING_cleanup_files (config_file);
|
||||||
/* @helpers. Run keyup, create tables, ... Note: it
|
/* @helpers. Run keyup, create tables, ... Note: it
|
||||||
* fetches the port number from config in order to see
|
* fetches the port number from config in order to see
|
||||||
* if it's available. */
|
* if it's available. */
|
||||||
switch (TALER_TESTING_prepare_exchange (CONFIG_FILE,
|
switch (TALER_TESTING_prepare_exchange (config_file,
|
||||||
GNUNET_YES,
|
GNUNET_YES,
|
||||||
&ec))
|
&ec))
|
||||||
{
|
{
|
||||||
@ -1158,7 +1166,7 @@ main (int argc,
|
|||||||
*/
|
*/
|
||||||
TALER_TESTING_setup_with_exchange (&run,
|
TALER_TESTING_setup_with_exchange (&run,
|
||||||
NULL,
|
NULL,
|
||||||
CONFIG_FILE))
|
config_file))
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -39,7 +39,7 @@ lished
|
|||||||
* Configuration file we use. One (big) configuration is used
|
* Configuration file we use. One (big) configuration is used
|
||||||
* for the various components for this test.
|
* for the various components for this test.
|
||||||
*/
|
*/
|
||||||
#define CONFIG_FILE "test_exchange_api_keys_cherry_picking.conf"
|
static char *config_file;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exchange configuration data.
|
* Exchange configuration data.
|
||||||
@ -66,11 +66,11 @@ run (void *cls,
|
|||||||
MHD_HTTP_NO_CONTENT,
|
MHD_HTTP_NO_CONTENT,
|
||||||
false),
|
false),
|
||||||
TALER_TESTING_cmd_exec_offline_sign_fees ("offline-sign-fees",
|
TALER_TESTING_cmd_exec_offline_sign_fees ("offline-sign-fees",
|
||||||
CONFIG_FILE,
|
config_file,
|
||||||
"EUR:0.01",
|
"EUR:0.01",
|
||||||
"EUR:0.01"),
|
"EUR:0.01"),
|
||||||
TALER_TESTING_cmd_exec_offline_sign_keys ("offline-sign-future-keys",
|
TALER_TESTING_cmd_exec_offline_sign_keys ("offline-sign-future-keys",
|
||||||
CONFIG_FILE),
|
config_file),
|
||||||
TALER_TESTING_cmd_check_keys_pull_all_keys ("initial-/keys",
|
TALER_TESTING_cmd_check_keys_pull_all_keys ("initial-/keys",
|
||||||
1),
|
1),
|
||||||
TALER_TESTING_cmd_sleep ("sleep",
|
TALER_TESTING_cmd_sleep ("sleep",
|
||||||
@ -109,19 +109,25 @@ int
|
|||||||
main (int argc,
|
main (int argc,
|
||||||
char *const *argv)
|
char *const *argv)
|
||||||
{
|
{
|
||||||
|
const char *cipher;
|
||||||
|
|
||||||
(void) argc;
|
(void) argc;
|
||||||
(void) argv;
|
|
||||||
/* These environment variables get in the way... */
|
/* These environment variables get in the way... */
|
||||||
unsetenv ("XDG_DATA_HOME");
|
unsetenv ("XDG_DATA_HOME");
|
||||||
unsetenv ("XDG_CONFIG_HOME");
|
unsetenv ("XDG_CONFIG_HOME");
|
||||||
GNUNET_log_setup ("test-exchange-api-cherry-picking",
|
GNUNET_log_setup (argv[0],
|
||||||
"DEBUG",
|
"DEBUG",
|
||||||
NULL);
|
NULL);
|
||||||
TALER_TESTING_cleanup_files (CONFIG_FILE);
|
cipher = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
|
||||||
|
GNUNET_assert (NULL != cipher);
|
||||||
|
GNUNET_asprintf (&config_file,
|
||||||
|
"test_exchange_api_keys_cherry_picking-%s.conf",
|
||||||
|
cipher);
|
||||||
|
TALER_TESTING_cleanup_files (config_file);
|
||||||
/* @helpers. Run keyup, create tables, ... Note: it
|
/* @helpers. Run keyup, create tables, ... Note: it
|
||||||
* fetches the port number from config in order to see
|
* fetches the port number from config in order to see
|
||||||
* if it's available. */
|
* if it's available. */
|
||||||
switch (TALER_TESTING_prepare_exchange (CONFIG_FILE,
|
switch (TALER_TESTING_prepare_exchange (config_file,
|
||||||
GNUNET_YES,
|
GNUNET_YES,
|
||||||
&ec))
|
&ec))
|
||||||
{
|
{
|
||||||
@ -138,7 +144,7 @@ main (int argc,
|
|||||||
*/
|
*/
|
||||||
TALER_TESTING_setup_with_exchange (&run,
|
TALER_TESTING_setup_with_exchange (&run,
|
||||||
NULL,
|
NULL,
|
||||||
CONFIG_FILE))
|
config_file))
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
* Configuration file we use. One (big) configuration is used
|
* Configuration file we use. One (big) configuration is used
|
||||||
* for the various components for this test.
|
* for the various components for this test.
|
||||||
*/
|
*/
|
||||||
#define CONFIG_FILE "test_exchange_api.conf"
|
static char *config_file;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exchange configuration data.
|
* Exchange configuration data.
|
||||||
@ -70,7 +70,7 @@ run (void *cls,
|
|||||||
MHD_HTTP_NO_CONTENT,
|
MHD_HTTP_NO_CONTENT,
|
||||||
false),
|
false),
|
||||||
TALER_TESTING_cmd_exec_offline_sign_keys ("offline-sign-future-keys",
|
TALER_TESTING_cmd_exec_offline_sign_keys ("offline-sign-future-keys",
|
||||||
CONFIG_FILE),
|
config_file),
|
||||||
TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys",
|
TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys",
|
||||||
1),
|
1),
|
||||||
/**
|
/**
|
||||||
@ -90,7 +90,7 @@ run (void *cls,
|
|||||||
* Run wire-watch to trigger the reserve creation.
|
* Run wire-watch to trigger the reserve creation.
|
||||||
*/
|
*/
|
||||||
TALER_TESTING_cmd_exec_wirewatch ("wirewatch-4",
|
TALER_TESTING_cmd_exec_wirewatch ("wirewatch-4",
|
||||||
CONFIG_FILE),
|
config_file),
|
||||||
/* Withdraw a 5 EUR coin, at fee of 1 ct */
|
/* Withdraw a 5 EUR coin, at fee of 1 ct */
|
||||||
TALER_TESTING_cmd_withdraw_amount ("withdraw-revocation-coin-1",
|
TALER_TESTING_cmd_withdraw_amount ("withdraw-revocation-coin-1",
|
||||||
"create-reserve-1",
|
"create-reserve-1",
|
||||||
@ -144,12 +144,12 @@ run (void *cls,
|
|||||||
TALER_TESTING_cmd_revoke ("revoke-2-EUR:5",
|
TALER_TESTING_cmd_revoke ("revoke-2-EUR:5",
|
||||||
MHD_HTTP_OK,
|
MHD_HTTP_OK,
|
||||||
"refresh-melt-1",
|
"refresh-melt-1",
|
||||||
CONFIG_FILE),
|
config_file),
|
||||||
/* Also make fully spent coin invalid (should be same denom) */
|
/* Also make fully spent coin invalid (should be same denom) */
|
||||||
TALER_TESTING_cmd_revoke ("revoke-2-EUR:5",
|
TALER_TESTING_cmd_revoke ("revoke-2-EUR:5",
|
||||||
MHD_HTTP_OK,
|
MHD_HTTP_OK,
|
||||||
"withdraw-revocation-coin-2",
|
"withdraw-revocation-coin-2",
|
||||||
CONFIG_FILE),
|
config_file),
|
||||||
/* Refund fully spent coin (which should fail) */
|
/* Refund fully spent coin (which should fail) */
|
||||||
TALER_TESTING_cmd_recoup ("recoup-fully-spent",
|
TALER_TESTING_cmd_recoup ("recoup-fully-spent",
|
||||||
MHD_HTTP_CONFLICT,
|
MHD_HTTP_CONFLICT,
|
||||||
@ -211,12 +211,12 @@ run (void *cls,
|
|||||||
TALER_TESTING_cmd_revoke ("revoke-3-EUR:0.1",
|
TALER_TESTING_cmd_revoke ("revoke-3-EUR:0.1",
|
||||||
MHD_HTTP_OK,
|
MHD_HTTP_OK,
|
||||||
"refresh-reveal-2",
|
"refresh-reveal-2",
|
||||||
CONFIG_FILE),
|
config_file),
|
||||||
/* Revoke also original coin denomination */
|
/* Revoke also original coin denomination */
|
||||||
TALER_TESTING_cmd_revoke ("revoke-4-EUR:5",
|
TALER_TESTING_cmd_revoke ("revoke-4-EUR:5",
|
||||||
MHD_HTTP_OK,
|
MHD_HTTP_OK,
|
||||||
"withdraw-revocation-coin-1",
|
"withdraw-revocation-coin-1",
|
||||||
CONFIG_FILE),
|
config_file),
|
||||||
/* Refund coin EUR:0.1 to original coin, creating zombie! */
|
/* Refund coin EUR:0.1 to original coin, creating zombie! */
|
||||||
TALER_TESTING_cmd_recoup_refresh ("recoup-2",
|
TALER_TESTING_cmd_recoup_refresh ("recoup-2",
|
||||||
MHD_HTTP_OK,
|
MHD_HTTP_OK,
|
||||||
@ -248,25 +248,31 @@ int
|
|||||||
main (int argc,
|
main (int argc,
|
||||||
char *const *argv)
|
char *const *argv)
|
||||||
{
|
{
|
||||||
|
const char *cipher;
|
||||||
|
|
||||||
(void) argc;
|
(void) argc;
|
||||||
(void) argv;
|
|
||||||
/* These environment variables get in the way... */
|
/* These environment variables get in the way... */
|
||||||
unsetenv ("XDG_DATA_HOME");
|
unsetenv ("XDG_DATA_HOME");
|
||||||
unsetenv ("XDG_CONFIG_HOME");
|
unsetenv ("XDG_CONFIG_HOME");
|
||||||
GNUNET_log_setup ("test-exchange-api-revocation",
|
GNUNET_log_setup (argv[0],
|
||||||
"INFO",
|
"INFO",
|
||||||
NULL);
|
NULL);
|
||||||
|
cipher = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
|
||||||
|
GNUNET_assert (NULL != cipher);
|
||||||
|
GNUNET_asprintf (&config_file,
|
||||||
|
"test_exchange_api-%s.conf",
|
||||||
|
cipher);
|
||||||
/* Check fakebank port is available and get config */
|
/* Check fakebank port is available and get config */
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_TESTING_prepare_fakebank (CONFIG_FILE,
|
TALER_TESTING_prepare_fakebank (config_file,
|
||||||
"exchange-account-2",
|
"exchange-account-2",
|
||||||
&bc))
|
&bc))
|
||||||
return 77;
|
return 77;
|
||||||
TALER_TESTING_cleanup_files (CONFIG_FILE);
|
TALER_TESTING_cleanup_files (config_file);
|
||||||
/* @helpers. Run keyup, create tables, ... Note: it
|
/* @helpers. Run keyup, create tables, ... Note: it
|
||||||
* fetches the port number from config in order to see
|
* fetches the port number from config in order to see
|
||||||
* if it's available. */
|
* if it's available. */
|
||||||
switch (TALER_TESTING_prepare_exchange (CONFIG_FILE,
|
switch (TALER_TESTING_prepare_exchange (config_file,
|
||||||
GNUNET_YES,
|
GNUNET_YES,
|
||||||
&ec))
|
&ec))
|
||||||
{
|
{
|
||||||
@ -283,7 +289,7 @@ main (int argc,
|
|||||||
*/
|
*/
|
||||||
TALER_TESTING_setup_with_exchange (&run,
|
TALER_TESTING_setup_with_exchange (&run,
|
||||||
NULL,
|
NULL,
|
||||||
CONFIG_FILE))
|
config_file))
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
* Configuration file we use. One (big) configuration is used
|
* Configuration file we use. One (big) configuration is used
|
||||||
* for the various components for this test.
|
* for the various components for this test.
|
||||||
*/
|
*/
|
||||||
#define CONFIG_FILE "test_exchange_api_twisted.conf"
|
static char *config_file;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (real) Twister URL. Used at startup time to check if it runs.
|
* (real) Twister URL. Used at startup time to check if it runs.
|
||||||
@ -73,7 +73,7 @@ static struct TALER_TESTING_Command
|
|||||||
CMD_EXEC_WIREWATCH (const char *label)
|
CMD_EXEC_WIREWATCH (const char *label)
|
||||||
{
|
{
|
||||||
return TALER_TESTING_cmd_exec_wirewatch (label,
|
return TALER_TESTING_cmd_exec_wirewatch (label,
|
||||||
CONFIG_FILE);
|
config_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ run (void *cls,
|
|||||||
NULL),
|
NULL),
|
||||||
/* Trigger 409 Conflict. */
|
/* Trigger 409 Conflict. */
|
||||||
TALER_TESTING_cmd_flip_upload ("flip-upload",
|
TALER_TESTING_cmd_flip_upload ("flip-upload",
|
||||||
CONFIG_FILE,
|
config_file,
|
||||||
"transfer_privs.0"),
|
"transfer_privs.0"),
|
||||||
TALER_TESTING_cmd_refresh_reveal ("refresh-(flipped-)reveal",
|
TALER_TESTING_cmd_refresh_reveal ("refresh-(flipped-)reveal",
|
||||||
"refresh-melt",
|
"refresh-melt",
|
||||||
@ -178,7 +178,7 @@ run (void *cls,
|
|||||||
"USD:5",
|
"USD:5",
|
||||||
"deposit-refund-1"),
|
"deposit-refund-1"),
|
||||||
TALER_TESTING_cmd_flip_upload ("flip-upload",
|
TALER_TESTING_cmd_flip_upload ("flip-upload",
|
||||||
CONFIG_FILE,
|
config_file,
|
||||||
"merchant_sig"),
|
"merchant_sig"),
|
||||||
TALER_TESTING_cmd_refund ("refund-bad-sig",
|
TALER_TESTING_cmd_refund ("refund-bad-sig",
|
||||||
MHD_HTTP_FORBIDDEN,
|
MHD_HTTP_FORBIDDEN,
|
||||||
@ -217,7 +217,7 @@ run (void *cls,
|
|||||||
*/
|
*/
|
||||||
struct TALER_TESTING_Command expired_keys[] = {
|
struct TALER_TESTING_Command expired_keys[] = {
|
||||||
TALER_TESTING_cmd_modify_header_dl ("modify-expiration",
|
TALER_TESTING_cmd_modify_header_dl ("modify-expiration",
|
||||||
CONFIG_FILE,
|
config_file,
|
||||||
MHD_HTTP_HEADER_EXPIRES,
|
MHD_HTTP_HEADER_EXPIRES,
|
||||||
"Wed, 19 Jan 586524 08:01:49 GMT"),
|
"Wed, 19 Jan 586524 08:01:49 GMT"),
|
||||||
TALER_TESTING_cmd_check_keys_pull_all_keys (
|
TALER_TESTING_cmd_check_keys_pull_all_keys (
|
||||||
@ -243,7 +243,7 @@ run (void *cls,
|
|||||||
MHD_HTTP_NO_CONTENT,
|
MHD_HTTP_NO_CONTENT,
|
||||||
false),
|
false),
|
||||||
TALER_TESTING_cmd_exec_offline_sign_keys ("offline-sign-future-keys",
|
TALER_TESTING_cmd_exec_offline_sign_keys ("offline-sign-future-keys",
|
||||||
CONFIG_FILE),
|
config_file),
|
||||||
TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys",
|
TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys",
|
||||||
1),
|
1),
|
||||||
TALER_TESTING_cmd_batch ("refresh-reveal-409-conflict",
|
TALER_TESTING_cmd_batch ("refresh-reveal-409-conflict",
|
||||||
@ -283,26 +283,31 @@ int
|
|||||||
main (int argc,
|
main (int argc,
|
||||||
char *const *argv)
|
char *const *argv)
|
||||||
{
|
{
|
||||||
|
const char *cipher;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
(void) argc;
|
(void) argc;
|
||||||
(void) argv;
|
|
||||||
/* These environment variables get in the way... */
|
/* These environment variables get in the way... */
|
||||||
unsetenv ("XDG_DATA_HOME");
|
unsetenv ("XDG_DATA_HOME");
|
||||||
unsetenv ("XDG_CONFIG_HOME");
|
unsetenv ("XDG_CONFIG_HOME");
|
||||||
GNUNET_log_setup ("test-exchange-api-twisted",
|
GNUNET_log_setup (argv[0],
|
||||||
"DEBUG",
|
"DEBUG",
|
||||||
NULL);
|
NULL);
|
||||||
|
cipher = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
|
||||||
|
GNUNET_assert (NULL != cipher);
|
||||||
|
GNUNET_asprintf (&config_file,
|
||||||
|
"test_exchange_api_twisted-%s.conf",
|
||||||
|
cipher);
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_TESTING_prepare_fakebank (CONFIG_FILE,
|
TALER_TESTING_prepare_fakebank (config_file,
|
||||||
"exchange-account-2",
|
"exchange-account-2",
|
||||||
&bc))
|
&bc))
|
||||||
return 77;
|
return 77;
|
||||||
if (NULL == (twister_url = TALER_TWISTER_prepare_twister
|
if (NULL == (twister_url = TALER_TWISTER_prepare_twister
|
||||||
(CONFIG_FILE)))
|
(config_file)))
|
||||||
return 77;
|
return 77;
|
||||||
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,
|
GNUNET_YES,
|
||||||
&ec))
|
&ec))
|
||||||
{
|
{
|
||||||
@ -312,11 +317,11 @@ main (int argc,
|
|||||||
case GNUNET_NO:
|
case GNUNET_NO:
|
||||||
return 77;
|
return 77;
|
||||||
case GNUNET_OK:
|
case GNUNET_OK:
|
||||||
if (NULL == (twisterd = TALER_TWISTER_run_twister (CONFIG_FILE)))
|
if (NULL == (twisterd = TALER_TWISTER_run_twister (config_file)))
|
||||||
return 77;
|
return 77;
|
||||||
ret = TALER_TESTING_setup_with_exchange (&run,
|
ret = TALER_TESTING_setup_with_exchange (&run,
|
||||||
NULL,
|
NULL,
|
||||||
CONFIG_FILE);
|
config_file);
|
||||||
purge_process (twisterd);
|
purge_process (twisterd);
|
||||||
GNUNET_free (twister_url);
|
GNUNET_free (twister_url);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user