mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 08:57:40 +00: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");
|
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 () => {
|
it("file over maxBytes: renamed to .bak.{timestamp}, returns true", async () => {
|
||||||
const bigContent = "x".repeat(200);
|
const bigContent = "x".repeat(200);
|
||||||
await fs.writeFile(storePath, bigContent, "utf-8");
|
await fs.writeFile(storePath, bigContent, "utf-8");
|
||||||
|
|||||||
Reference in New Issue
Block a user