test: remove redundant in-dir relative session-file acceptance case

This commit is contained in:
Peter Steinberger
2026-02-16 08:49:41 +00:00
parent bf801f5159
commit 731d72e119

View File

@@ -87,18 +87,6 @@ describe("session path safety", () => {
).toThrow(/within sessions directory/);
});
it("accepts sessionFile candidates within the sessions dir", () => {
const sessionsDir = "/tmp/openclaw/agents/main/sessions";
const resolved = resolveSessionFilePath(
"sess-1",
{ sessionFile: "subdir/threaded-session.jsonl" },
{ sessionsDir },
);
expect(resolved).toBe(path.resolve(sessionsDir, "subdir/threaded-session.jsonl"));
});
it("accepts absolute sessionFile paths that resolve within the sessions dir", () => {
const sessionsDir = "/tmp/openclaw/agents/main/sessions";