minor fixes

This commit is contained in:
Marcello Stanisci 2019-04-10 11:17:18 +02:00
parent 814522d21c
commit ca718b9f1f
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F
4 changed files with 12 additions and 19 deletions

View File

@ -498,7 +498,8 @@ TALER_BANK_history (struct GNUNET_CURL_Context *ctx,
/* Locate and "cut" the 'start' argument, /* Locate and "cut" the 'start' argument,
* if the user didn't provide one. */ * if the user didn't provide one. */
if (UINT64_MAX == start_row) if (UINT64_MAX == start_row)
*strstr (url, "&start=") = '\0'; *strstr (url,
"&start=") = '\0';
hh = put_history_job (ctx, hh = put_history_job (ctx,
bank_base_url, bank_base_url,

View File

@ -81,24 +81,19 @@ static void
run (void *cls, run (void *cls,
struct TALER_TESTING_Interpreter *is) struct TALER_TESTING_Interpreter *is)
{ {
struct TALER_TESTING_Command commands[] = { struct TALER_TESTING_Command commands[] = {
TALER_TESTING_cmd_bank_history ("history-0", TALER_TESTING_cmd_bank_history ("history-0",
twister_url, TWISTED_BANK_URL,
EXCHANGE_ACCOUNT_NUMBER, EXCHANGE_ACCOUNT_NUMBER,
TALER_BANK_DIRECTION_BOTH, TALER_BANK_DIRECTION_BOTH,
GNUNET_NO, GNUNET_NO,
NULL, NULL,
5), 5),
/**
* End the suite. Fixme: better to have a label for this
* too, as it shows a "(null)" token on logs.
*/
TALER_TESTING_cmd_end () TALER_TESTING_cmd_end ()
}; };
TALER_TESTING_run (is, commands); TALER_TESTING_run (is,
commands);
} }
/** /**
@ -109,7 +104,8 @@ run (void *cls,
static void static void
purge_process (struct GNUNET_OS_Process *process) purge_process (struct GNUNET_OS_Process *process)
{ {
GNUNET_OS_process_kill (process, SIGINT); GNUNET_OS_process_kill (process,
SIGINT);
GNUNET_OS_process_wait (process); GNUNET_OS_process_wait (process);
GNUNET_OS_process_destroy (process); GNUNET_OS_process_destroy (process);
} }
@ -124,14 +120,16 @@ main (int argc,
unsetenv ("XDG_CONFIG_HOME"); unsetenv ("XDG_CONFIG_HOME");
GNUNET_log_setup ("test-bank-api-twisted", GNUNET_log_setup ("test-bank-api-twisted",
"DEBUG", NULL); "DEBUG",
NULL);
if (NULL == (bank_url = TALER_TESTING_prepare_bank if (NULL == (bank_url = TALER_TESTING_prepare_bank
(CONFIG_FILE))) (CONFIG_FILE)))
return 77; return 77;
if (NULL == (bankd = TALER_TESTING_run_bank if (NULL == (bankd = TALER_TESTING_run_bank
(CONFIG_FILE, bank_url))) (CONFIG_FILE,
bank_url)))
return 77; return 77;
if (NULL == (twister_url = TALER_TESTING_prepare_twister if (NULL == (twister_url = TALER_TESTING_prepare_twister

View File

@ -63,12 +63,6 @@ run (void *cls,
struct TALER_TESTING_Command commands[] = { struct TALER_TESTING_Command commands[] = {
/**
* NOTE: this command uses internally the _fakebank_ version
* of the add-incoming command. However, this does seem to
* work fine against the Python bank too! Some renaming is
* required..
*/
TALER_TESTING_cmd_bank_history ("history-0", TALER_TESTING_cmd_bank_history ("history-0",
fakebank_url, fakebank_url,
BANK_ACCOUNT_NUMBER, BANK_ACCOUNT_NUMBER,

View File

@ -77,7 +77,7 @@ run (void *cls,
{ {
struct TALER_TESTING_Command commands[] = { struct TALER_TESTING_Command commands[] = {
TALER_TESTING_cmd_bank_history ("history-0", TALER_TESTING_cmd_bank_history ("history-0",
fakebank_url, twister_url,
EXCHANGE_ACCOUNT_NUMBER, EXCHANGE_ACCOUNT_NUMBER,
TALER_BANK_DIRECTION_BOTH, TALER_BANK_DIRECTION_BOTH,
GNUNET_NO, GNUNET_NO,