test: fix onboard Docker test state setup

This commit is contained in:
Peter Steinberger
2026-04-28 20:56:10 +01:00
parent c1c217035d
commit 3d736f67cf
2 changed files with 22 additions and 20 deletions

View File

@@ -9,6 +9,7 @@ import { describe, expect, it } from "vitest";
const execFileAsync = promisify(execFile);
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
const scriptPath = path.join(repoRoot, "scripts/lib/openclaw-test-state.mjs");
const onboardDockerScriptPath = path.join(repoRoot, "scripts/e2e/onboard-docker.sh");
function shellQuote(value: string): string {
return `'${value.replace(/'/gu, `'\\''`)}'`;
@@ -142,4 +143,13 @@ describe("scripts/lib/openclaw-test-state", () => {
await fs.rm(tempRoot, { recursive: true, force: true });
}
});
it("keeps onboard Docker temp homes on the shared test-state helper", async () => {
const scriptText = await fs.readFile(onboardDockerScriptPath, "utf8");
expect(scriptText).toContain("OPENCLAW_TEST_STATE_FUNCTION_B64");
expect(scriptText).toContain("set_isolated_openclaw_env local-basic");
expect(scriptText).toContain("run_wizard_cmd channels channels");
expect(scriptText).not.toContain("make_home");
});
});