mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-10 00:11:19 +00:00
test: preserve daemon coverage env scope
This commit is contained in:
parent
2b8c089b76
commit
d693b70bfc
1 changed files with 5 additions and 5 deletions
|
|
@ -4,7 +4,7 @@ import os from "node:os";
|
|||
import path from "node:path";
|
||||
import { Command } from "commander";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { captureEnv } from "../test-utils/env.js";
|
||||
import { captureEnv, deleteTestEnvValue, setTestEnvValue } from "../test-utils/env.js";
|
||||
import { registerDaemonCli } from "./daemon-cli/register.js";
|
||||
|
||||
const probeGatewayStatus = vi.fn(async (..._args: unknown[]) => ({ ok: true }));
|
||||
|
|
@ -191,10 +191,10 @@ describe("daemon-cli coverage", () => {
|
|||
"OPENCLAW_GATEWAY_PORT",
|
||||
"OPENCLAW_PROFILE",
|
||||
]);
|
||||
process.env.OPENCLAW_STATE_DIR = tmpDir;
|
||||
process.env.OPENCLAW_CONFIG_PATH = path.join(tmpDir, "openclaw.json");
|
||||
delete process.env.OPENCLAW_GATEWAY_PORT;
|
||||
delete process.env.OPENCLAW_PROFILE;
|
||||
setTestEnvValue("OPENCLAW_STATE_DIR", tmpDir);
|
||||
setTestEnvValue("OPENCLAW_CONFIG_PATH", path.join(tmpDir, "openclaw.json"));
|
||||
deleteTestEnvValue("OPENCLAW_GATEWAY_PORT");
|
||||
deleteTestEnvValue("OPENCLAW_PROFILE");
|
||||
serviceReadCommand.mockResolvedValue(null);
|
||||
resolveGatewayProbeAuthSafeWithSecretInputs.mockClear();
|
||||
findExtraGatewayServices.mockClear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue