mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 03:03:24 -04:00
test: remove redundant default-root explicit fallback case
This commit is contained in:
@@ -148,20 +148,6 @@ describe("session path safety", () => {
|
||||
).toThrow(/within sessions directory/);
|
||||
});
|
||||
|
||||
it("uses explicit agentId fallback for absolute sessionFile outside sessionsDir", () => {
|
||||
const mainSessionsDir = path.dirname(resolveStorePath(undefined, { agentId: "main" }));
|
||||
const opsSessionsDir = path.dirname(resolveStorePath(undefined, { agentId: "ops" }));
|
||||
const opsSessionFile = path.join(opsSessionsDir, "abc-123.jsonl");
|
||||
|
||||
const resolved = resolveSessionFilePath(
|
||||
"sess-1",
|
||||
{ sessionFile: opsSessionFile },
|
||||
{ sessionsDir: mainSessionsDir, agentId: "ops" },
|
||||
);
|
||||
|
||||
expect(resolved).toBe(path.resolve(opsSessionFile));
|
||||
});
|
||||
|
||||
it("uses sibling fallback for custom per-agent store roots", () => {
|
||||
const mainSessionsDir = "/srv/custom/agents/main/sessions";
|
||||
const opsSessionFile = "/srv/custom/agents/ops/sessions/abc-123.jsonl";
|
||||
|
||||
Reference in New Issue
Block a user