test: reuse node host home fixture · openclaw/openclaw@c0a9b69
steipete
·
2026-04-18
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -47,12 +47,14 @@ describe("formatSystemRunAllowlistMissMessage", () => {
|
4747|
4848describe("handleSystemRunInvoke mac app exec host routing", () => {
|
4949let sharedFixtureRoot = "";
|
50+let sharedOpenClawHome = "";
|
5051let sharedFixtureId = 0;
|
51-let testOpenClawHome = "";
|
5252let previousOpenClawHome: string | undefined;
|
5353|
5454beforeAll(() => {
|
5555sharedFixtureRoot = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-node-host-fixtures-"));
|
56+sharedOpenClawHome = path.join(sharedFixtureRoot, "openclaw-home");
|
57+fs.mkdirSync(sharedOpenClawHome, { recursive: true });
|
5658});
|
5759|
5860afterAll(() => {
|
@@ -69,8 +71,7 @@ describe("handleSystemRunInvoke mac app exec host routing", () => {
|
6971|
7072beforeEach(() => {
|
7173previousOpenClawHome = process.env.OPENCLAW_HOME;
|
72-testOpenClawHome = createFixtureDir("openclaw-node-host-home-");
|
73-process.env.OPENCLAW_HOME = testOpenClawHome;
|
74+process.env.OPENCLAW_HOME = sharedOpenClawHome;
|
7475clearRuntimeConfigSnapshot();
|
7576});
|
7677|
@@ -81,7 +82,6 @@ describe("handleSystemRunInvoke mac app exec host routing", () => {
|
8182} else {
|
8283process.env.OPENCLAW_HOME = previousOpenClawHome;
|
8384}
|
84-testOpenClawHome = "";
|
8585});
|
8686|
8787function createLocalRunResult(stdout = "local-ok") {
|
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。