mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 09:17:27 +00:00
Config: record empty heartbeat legacy removal
This commit is contained in:
@@ -208,6 +208,16 @@ describe("legacy migrate heartbeat config", () => {
|
||||
expect((res.config as { heartbeat?: unknown } | null)?.heartbeat).toBeUndefined();
|
||||
expect((res.config as { agent?: unknown } | null)?.agent).toBeUndefined();
|
||||
});
|
||||
|
||||
it("records a migration change when removing empty top-level heartbeat", () => {
|
||||
const res = migrateLegacyConfig({
|
||||
heartbeat: {},
|
||||
});
|
||||
|
||||
expect(res.changes).toContain("Removed empty top-level heartbeat.");
|
||||
expect(res.config).not.toBeNull();
|
||||
expect((res.config as { heartbeat?: unknown } | null)?.heartbeat).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe("legacy migrate controlUi.allowedOrigins seed (issue #29385)", () => {
|
||||
|
||||
@@ -343,6 +343,9 @@ export const LEGACY_CONFIG_MIGRATIONS_PART_3: LegacyConfigMigration[] = [
|
||||
raw.channels = channels;
|
||||
}
|
||||
|
||||
if (!agentHeartbeat && !channelHeartbeat) {
|
||||
changes.push("Removed empty top-level heartbeat.");
|
||||
}
|
||||
delete raw.heartbeat;
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user