test: remove low-value absolute-in-dir session-file happy path

This commit is contained in:
Peter Steinberger
2026-02-16 08:51:41 +00:00
parent f448e4bf77
commit 896f9efcb7

View File

@@ -86,18 +86,6 @@ describe("session path safety", () => {
).toThrow(/within sessions directory/);
});
it("accepts absolute sessionFile paths that resolve within the sessions dir", () => {
const sessionsDir = "/tmp/openclaw/agents/main/sessions";
const resolved = resolveSessionFilePath(
"sess-1",
{ sessionFile: "/tmp/openclaw/agents/main/sessions/abc-123.jsonl" },
{ sessionsDir },
);
expect(resolved).toBe(path.resolve(sessionsDir, "abc-123.jsonl"));
});
it("rejects absolute sessionFile paths outside known agent sessions dirs", () => {
const sessionsDir = "/tmp/openclaw/agents/main/sessions";