configure havenod log level in tests

This commit is contained in:
woodser 2023-01-18 10:11:47 -05:00
parent 6f179b3f79
commit 173bb4a807

View File

@ -82,6 +82,7 @@ const TestConfig = {
}, },
defaultHavenod: { defaultHavenod: {
logProcessOutput: true, // log output for processes started by tests (except arbitrator, user1, and user2 which are configured separately) logProcessOutput: true, // log output for processes started by tests (except arbitrator, user1, and user2 which are configured separately)
logLevel: "info",
apiPassword: "apitest", apiPassword: "apitest",
walletUsername: "haveno_user", walletUsername: "haveno_user",
walletDefaultPassword: "password", // only used if account password not set walletDefaultPassword: "password", // only used if account password not set
@ -181,6 +182,7 @@ const TestConfig = {
interface HavenodContext { interface HavenodContext {
logProcessOutput?: boolean, logProcessOutput?: boolean,
logLevel?: string,
apiPassword?: string, apiPassword?: string,
walletUsername?: string, walletUsername?: string,
walletDefaultPassword?: string, walletDefaultPassword?: string,
@ -2568,7 +2570,8 @@ async function initHaveno(ctx?: HavenodContext): Promise<HavenoClient> {
"--apiPassword", "apitest", "--apiPassword", "apitest",
"--apiPort", TestConfig.ports.get(ctx.port)![0], "--apiPort", TestConfig.ports.get(ctx.port)![0],
"--walletRpcBindPort", ctx.walletUrl ? getPort(ctx.walletUrl) : "" + await getAvailablePort(), // use configured port if given "--walletRpcBindPort", ctx.walletUrl ? getPort(ctx.walletUrl) : "" + await getAvailablePort(), // use configured port if given
"--passwordRequired", (ctx.accountPasswordRequired ? "true" : "false") "--passwordRequired", (ctx.accountPasswordRequired ? "true" : "false"),
"--logLevel", ctx.logLevel!
]; ];
havenod = await HavenoClient.startProcess(TestConfig.haveno.path, cmd, "http://localhost:" + ctx.port, ctx.logProcessOutput!); havenod = await HavenoClient.startProcess(TestConfig.haveno.path, cmd, "http://localhost:" + ctx.port, ctx.logProcessOutput!);
HAVENO_PROCESSES.push(havenod); HAVENO_PROCESSES.push(havenod);