mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 11:30:43 +00:00
test(daemon): read launchd fixture files
This commit is contained in:
@@ -249,6 +249,14 @@ vi.mock("node:fs/promises", async () => {
|
||||
unlink: vi.fn(async (p: string) => {
|
||||
state.files.delete(p);
|
||||
}),
|
||||
readFile: vi.fn(async (p: string) => {
|
||||
const key = p;
|
||||
const data = state.files.get(key);
|
||||
if (data !== undefined) {
|
||||
return data;
|
||||
}
|
||||
throw new Error(`ENOENT: no such file or directory, read '${key}'`);
|
||||
}),
|
||||
writeFile: vi.fn(async (p: string, data: string, opts?: { mode?: number }) => {
|
||||
const key = p;
|
||||
state.files.set(key, data);
|
||||
@@ -490,7 +498,6 @@ describe("launchd install", () => {
|
||||
const plistPath = resolveLaunchAgentPlistPath(env);
|
||||
state.serviceLoaded = false;
|
||||
state.kickstartError = "Could not find service";
|
||||
state.kickstartCode = 113;
|
||||
state.kickstartFailuresRemaining = 1;
|
||||
state.files.set(
|
||||
plistPath,
|
||||
|
||||
Reference in New Issue
Block a user