mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 18:08:27 +00:00
test(agents): add compaction and workspace reset regressions
This commit is contained in:
@@ -76,6 +76,34 @@ describe("onboardCommand", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("uses configured default workspace for --reset when --workspace is not provided", async () => {
|
||||
const runtime = makeRuntime();
|
||||
mocks.readConfigFileSnapshot.mockResolvedValue({
|
||||
exists: true,
|
||||
valid: true,
|
||||
config: {
|
||||
agents: {
|
||||
defaults: {
|
||||
workspace: "/tmp/openclaw-custom-workspace",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
await onboardCommand(
|
||||
{
|
||||
reset: true,
|
||||
},
|
||||
runtime,
|
||||
);
|
||||
|
||||
expect(mocks.handleReset).toHaveBeenCalledWith(
|
||||
"config+creds+sessions",
|
||||
"/tmp/openclaw-custom-workspace",
|
||||
runtime,
|
||||
);
|
||||
});
|
||||
|
||||
it("accepts explicit --reset-scope full", async () => {
|
||||
const runtime = makeRuntime();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user