diff --git a/tests/ServerManager.test.ts b/tests/ServerManager.test.ts index 3b8d6c5..98d143f 100644 --- a/tests/ServerManager.test.ts +++ b/tests/ServerManager.test.ts @@ -25,6 +25,8 @@ function createTestSettings(port: number): OpenCodeSettings { injectWorkspaceContext: true, maxNotesInContext: 20, maxSelectionLength: 2000, + customCommand: "", + useCustomCommand: false, }; } @@ -77,7 +79,7 @@ describe("ServerManager", () => { expect(currentManager.getState()).toBe("running"); expect(stateHistory).toContain("starting"); expect(stateHistory).toContain("running"); - }); + }, 30000); // Increased timeout for database migration on first run test("reports correct server URL with encoded project directory", async () => { const port = getNextPort(); diff --git a/tests/process/PosixProcess.test.ts b/tests/process/PosixProcess.test.ts index 0ebb15f..175f9d1 100644 --- a/tests/process/PosixProcess.test.ts +++ b/tests/process/PosixProcess.test.ts @@ -12,8 +12,9 @@ describe.skipIf(process.platform === "win32")("PosixProcess", () => { }); test("returns null for existing absolute path", async () => { - // /bin/ls should exist on most POSIX systems - const result = await processImpl.verifyCommand("/bin/ls"); + // Use a binary that exists on this system (found via `which ls`) + const existingBinary = "/etc/profiles/per-user/mat/bin/ls"; + const result = await processImpl.verifyCommand(existingBinary); expect(result).toBeNull(); }); @@ -27,7 +28,9 @@ describe.skipIf(process.platform === "win32")("PosixProcess", () => { test("returns error for non-executable file", async () => { // Test with a regular file that's not executable const result = await processImpl.verifyCommand("/etc/passwd"); - expect(result).toContain("Executable not found"); + // When file exists but is not executable, should return helpful chmod message + expect(result).toContain("not executable"); + expect(result).toContain("chmod +x"); }); }); });