mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 03:03:24 -04:00
test: remove low-value no-rotation file-size case
This commit is contained in:
@@ -116,16 +116,6 @@ describe("rotateSessionFile", () => {
|
||||
storePath = path.join(testDir, "sessions.json");
|
||||
});
|
||||
|
||||
it("file under maxBytes: no rotation (returns false)", async () => {
|
||||
await fs.writeFile(storePath, "x".repeat(500), "utf-8");
|
||||
|
||||
const rotated = await rotateSessionFile(storePath, 1000);
|
||||
|
||||
expect(rotated).toBe(false);
|
||||
const content = await fs.readFile(storePath, "utf-8");
|
||||
expect(content).toBe("x".repeat(500));
|
||||
});
|
||||
|
||||
it("file over maxBytes: renamed to .bak.{timestamp}, returns true", async () => {
|
||||
const bigContent = "x".repeat(200);
|
||||
await fs.writeFile(storePath, bigContent, "utf-8");
|
||||
|
||||
Reference in New Issue
Block a user