mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:31:36 +00:00
test: remove redundant default-root extracted fallback case
This commit is contained in:
@@ -162,20 +162,6 @@ describe("session path safety", () => {
|
|||||||
expect(resolved).toBe(path.resolve(opsSessionFile));
|
expect(resolved).toBe(path.resolve(opsSessionFile));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("uses absolute path fallback when sessionFile includes a different agent dir", () => {
|
|
||||||
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 },
|
|
||||||
);
|
|
||||||
|
|
||||||
expect(resolved).toBe(path.resolve(opsSessionFile));
|
|
||||||
});
|
|
||||||
|
|
||||||
it("uses sibling fallback for custom per-agent store roots", () => {
|
it("uses sibling fallback for custom per-agent store roots", () => {
|
||||||
const mainSessionsDir = "/srv/custom/agents/main/sessions";
|
const mainSessionsDir = "/srv/custom/agents/main/sessions";
|
||||||
const opsSessionFile = "/srv/custom/agents/ops/sessions/abc-123.jsonl";
|
const opsSessionFile = "/srv/custom/agents/ops/sessions/abc-123.jsonl";
|
||||||
|
|||||||
Reference in New Issue
Block a user