mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 14:44:32 +00:00
test: remove redundant in-dir relative session-file acceptance case
This commit is contained in:
@@ -87,18 +87,6 @@ describe("session path safety", () => {
|
|||||||
).toThrow(/within sessions directory/);
|
).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", () => {
|
it("accepts absolute sessionFile paths that resolve within the sessions dir", () => {
|
||||||
const sessionsDir = "/tmp/openclaw/agents/main/sessions";
|
const sessionsDir = "/tmp/openclaw/agents/main/sessions";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user