Aggregator tests execute first CMD.
This commit is contained in:
parent
d7ccfad610
commit
1fc8fd22dc
@ -20,6 +20,12 @@ MASTER_PUBLIC_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
|
|||||||
# the tracking API.
|
# the tracking API.
|
||||||
BASE_URL = "https://exchange.taler.net/"
|
BASE_URL = "https://exchange.taler.net/"
|
||||||
|
|
||||||
|
[auditor]
|
||||||
|
BASE_URL = "http://auditor.example.com/"
|
||||||
|
|
||||||
|
[auditordb-postgres]
|
||||||
|
CONFIG = "postgres:///talercheck"
|
||||||
|
|
||||||
[exchangedb]
|
[exchangedb]
|
||||||
# After how long do we close idle reserves? The exchange
|
# After how long do we close idle reserves? The exchange
|
||||||
# and the auditor must agree on this value. We currently
|
# and the auditor must agree on this value. We currently
|
||||||
@ -34,7 +40,6 @@ IDLE_RESERVE_EXPIRATION_TIME = 4 weeks
|
|||||||
#The connection string the plugin has to use for connecting to the database
|
#The connection string the plugin has to use for connecting to the database
|
||||||
CONFIG = postgres:///talercheck
|
CONFIG = postgres:///talercheck
|
||||||
|
|
||||||
|
|
||||||
[exchangedb]
|
[exchangedb]
|
||||||
|
|
||||||
# After how long do we close idle reserves? The exchange
|
# After how long do we close idle reserves? The exchange
|
||||||
@ -53,9 +58,8 @@ LEGAL_RESERVE_EXPIRATION_TIME = 7 years
|
|||||||
|
|
||||||
# What is the account URL?
|
# What is the account URL?
|
||||||
URL = "payto://x-taler-bank/localhost:8082/3"
|
URL = "payto://x-taler-bank/localhost:8082/3"
|
||||||
|
method = "x-taler-bank"
|
||||||
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
|
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
|
||||||
PLUGIN = "taler_bank"
|
|
||||||
ENABLE_DEBIT = YES
|
ENABLE_DEBIT = YES
|
||||||
ENABLE_CREDIT = YES
|
ENABLE_CREDIT = YES
|
||||||
TALER_BANK_AUTH_METHOD = NONE
|
TALER_BANK_AUTH_METHOD = NONE
|
||||||
|
@ -116,6 +116,7 @@ fake_coin (struct TALER_CoinPublicInfo *coin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
/**
|
/**
|
||||||
* Helper function to fake a deposit operation.
|
* Helper function to fake a deposit operation.
|
||||||
*
|
*
|
||||||
@ -208,6 +209,7 @@ do_deposit (struct Command *cmd)
|
|||||||
json_decref (deposit.receiver_wire_account);
|
json_decref (deposit.receiver_wire_account);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interprets the commands from the test program.
|
* Interprets the commands from the test program.
|
||||||
@ -867,7 +869,8 @@ run_test ()
|
|||||||
* otherwise GNUNET_OK
|
* otherwise GNUNET_OK
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
prepare_database (const struct GNUNET_CONFIGURATION_Handle *cfg)
|
prepare_database (void *cls,
|
||||||
|
const struct GNUNET_CONFIGURATION_Handle *cfg)
|
||||||
{
|
{
|
||||||
|
|
||||||
// connect to the database.
|
// connect to the database.
|
||||||
@ -896,13 +899,20 @@ prepare_database (const struct GNUNET_CONFIGURATION_Handle *cfg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Collects all the tests.
|
||||||
|
*/
|
||||||
static void
|
static void
|
||||||
run (void *cls,
|
run (void *cls,
|
||||||
struct TALER_TESTING_Interpreter *is)
|
struct TALER_TESTING_Interpreter *is)
|
||||||
{
|
{
|
||||||
if (GNUNET_OK != prepare_database (is->cfg))
|
struct TALER_TESTING_Command all[] = {
|
||||||
return;
|
TALER_TESTING_cmd_end ()
|
||||||
|
};
|
||||||
|
|
||||||
|
TALER_TESTING_run_with_fakebank (is,
|
||||||
|
all,
|
||||||
|
bc.bank_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -915,11 +925,6 @@ main (int argc,
|
|||||||
struct GNUNET_CONFIGURATION_Handle *cfg;
|
struct GNUNET_CONFIGURATION_Handle *cfg;
|
||||||
struct GNUNET_SIGNAL_Context *shc_chld;
|
struct GNUNET_SIGNAL_Context *shc_chld;
|
||||||
|
|
||||||
|
|
||||||
/* these might get in the way */
|
|
||||||
unsetenv ("XDG_DATA_HOME");
|
|
||||||
unsetenv ("XDG_CONFIG_HOME");
|
|
||||||
|
|
||||||
if (NULL == (plugin_name = strrchr (argv[0], (int) '-')))
|
if (NULL == (plugin_name = strrchr (argv[0], (int) '-')))
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
@ -937,13 +942,17 @@ main (int argc,
|
|||||||
"DEBUG",
|
"DEBUG",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
/* these might get in the way */
|
||||||
|
unsetenv ("XDG_DATA_HOME");
|
||||||
|
unsetenv ("XDG_CONFIG_HOME");
|
||||||
|
|
||||||
TALER_TESTING_cleanup_files (config_filename);
|
TALER_TESTING_cleanup_files (config_filename);
|
||||||
|
|
||||||
|
// BUG: FAILS NOW.
|
||||||
if (GNUNET_OK != TALER_TESTING_prepare_exchange (config_filename,
|
if (GNUNET_OK != TALER_TESTING_prepare_exchange (config_filename,
|
||||||
&ec))
|
&ec))
|
||||||
{
|
{
|
||||||
TALER_LOG_WARNING ("Could not prepare the exchange (keyup, ..)\n");
|
TALER_LOG_WARNING ("Could not prepare the exchange.\n");
|
||||||
return 77;
|
return 77;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -958,6 +967,13 @@ main (int argc,
|
|||||||
coin_pk = GNUNET_CRYPTO_rsa_private_key_create (1024);
|
coin_pk = GNUNET_CRYPTO_rsa_private_key_create (1024);
|
||||||
coin_pub = GNUNET_CRYPTO_rsa_private_key_get_public (coin_pk);
|
coin_pub = GNUNET_CRYPTO_rsa_private_key_get_public (coin_pk);
|
||||||
|
|
||||||
|
if (GNUNET_OK != GNUNET_CONFIGURATION_parse_and_run (config_filename,
|
||||||
|
&prepare_database,
|
||||||
|
NULL))
|
||||||
|
{
|
||||||
|
TALER_LOG_WARNING ("Could not prepare database for tests.\n");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
result = TALER_TESTING_setup (&run,
|
result = TALER_TESTING_setup (&run,
|
||||||
NULL,
|
NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user