introduce TALER_TESTING_cmd_exec_wirewatch2
This commit is contained in:
parent
0a4422f5fa
commit
0698835fed
@ -943,6 +943,20 @@ TALER_TESTING_cmd_exec_wirewatch (const char *label,
|
|||||||
const char *config_filename);
|
const char *config_filename);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make a "wirewatch" CMD.
|
||||||
|
*
|
||||||
|
* @param label command label.
|
||||||
|
* @param config_filename configuration filename.
|
||||||
|
* @param account section to run wirewatch against
|
||||||
|
* @return the command.
|
||||||
|
*/
|
||||||
|
struct TALER_TESTING_Command
|
||||||
|
TALER_TESTING_cmd_exec_wirewatch2 (const char *label,
|
||||||
|
const char *config_filename,
|
||||||
|
const char *account_section);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request URL via "wget".
|
* Request URL via "wget".
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of TALER
|
This file is part of TALER
|
||||||
Copyright (C) 2018 Taler Systems SA
|
Copyright (C) 2018, 2023 Taler Systems SA
|
||||||
|
|
||||||
TALER is free software; you can redistribute it and/or modify
|
TALER is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as
|
it under the terms of the GNU General Public License as
|
||||||
@ -43,6 +43,11 @@ struct WirewatchState
|
|||||||
* Configuration file used by the wirewatcher.
|
* Configuration file used by the wirewatcher.
|
||||||
*/
|
*/
|
||||||
const char *config_filename;
|
const char *config_filename;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Account section to be used by the wirewatcher.
|
||||||
|
*/
|
||||||
|
const char *account_section;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -71,6 +76,10 @@ wirewatch_run (void *cls,
|
|||||||
"-w", "0",
|
"-w", "0",
|
||||||
"-t", /* exit when done */
|
"-t", /* exit when done */
|
||||||
"-L", "DEBUG",
|
"-L", "DEBUG",
|
||||||
|
(NULL == ws->account_section)
|
||||||
|
? NULL
|
||||||
|
: "-a",
|
||||||
|
ws->account_section,
|
||||||
NULL);
|
NULL);
|
||||||
if (NULL == ws->wirewatch_proc)
|
if (NULL == ws->wirewatch_proc)
|
||||||
{
|
{
|
||||||
@ -138,14 +147,15 @@ wirewatch_traits (void *cls,
|
|||||||
|
|
||||||
|
|
||||||
struct TALER_TESTING_Command
|
struct TALER_TESTING_Command
|
||||||
TALER_TESTING_cmd_exec_wirewatch (const char *label,
|
TALER_TESTING_cmd_exec_wirewatch2 (const char *label,
|
||||||
const char *config_filename)
|
const char *config_filename,
|
||||||
|
const char *account_section)
|
||||||
{
|
{
|
||||||
struct WirewatchState *ws;
|
struct WirewatchState *ws;
|
||||||
|
|
||||||
ws = GNUNET_new (struct WirewatchState);
|
ws = GNUNET_new (struct WirewatchState);
|
||||||
ws->config_filename = config_filename;
|
ws->config_filename = config_filename;
|
||||||
|
ws->account_section = account_section;
|
||||||
{
|
{
|
||||||
struct TALER_TESTING_Command cmd = {
|
struct TALER_TESTING_Command cmd = {
|
||||||
.cls = ws,
|
.cls = ws,
|
||||||
@ -160,4 +170,14 @@ TALER_TESTING_cmd_exec_wirewatch (const char *label,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
struct TALER_TESTING_Command
|
||||||
|
TALER_TESTING_cmd_exec_wirewatch (const char *label,
|
||||||
|
const char *config_filename)
|
||||||
|
{
|
||||||
|
return TALER_TESTING_cmd_exec_wirewatch2 (label,
|
||||||
|
config_filename,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* end of testing_api_cmd_exec_wirewatch.c */
|
/* end of testing_api_cmd_exec_wirewatch.c */
|
||||||
|
Loading…
Reference in New Issue
Block a user