mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 15:54:47 +00:00
test: stipulate hermes migration warnings
This commit is contained in:
@@ -99,7 +99,9 @@ describe("Hermes migration config mapping", () => {
|
||||
},
|
||||
},
|
||||
});
|
||||
expect((plan.warnings ?? []).some((warning) => warning.includes("manual review"))).toBe(true);
|
||||
expect(plan.warnings).toEqual([
|
||||
"Some Hermes settings require manual review before they can be activated safely.",
|
||||
]);
|
||||
});
|
||||
|
||||
it("applies mapped config items through the migration runtime config writer", async () => {
|
||||
|
||||
@@ -169,7 +169,9 @@ describe("Hermes migration file and skill items", () => {
|
||||
expect(plannedAuth?.kind).toBe("archive");
|
||||
expect(plannedAuth?.action).toBe("archive");
|
||||
expect(plannedAuth?.status).toBe("planned");
|
||||
expect((plan.warnings ?? []).some((warning) => warning.includes("archive-only"))).toBe(true);
|
||||
expect(plan.warnings).toEqual([
|
||||
"Some Hermes files are archive-only. They will be copied into the migration report for manual review, not loaded into OpenClaw.",
|
||||
]);
|
||||
|
||||
const result = await provider.apply(makeContext({ source, stateDir, workspaceDir, reportDir }));
|
||||
|
||||
|
||||
@@ -136,10 +136,9 @@ describe("Hermes migration provider", () => {
|
||||
expect(secret?.sensitive).toBe(true);
|
||||
expect(secret?.status).toBe("skipped");
|
||||
expect(secret?.reason).toBe(HERMES_REASON_INCLUDE_SECRETS);
|
||||
const warnings = plan.warnings ?? [];
|
||||
expect(warnings.some((warning) => warning.includes("Secrets were detected but skipped"))).toBe(
|
||||
true,
|
||||
);
|
||||
expect(warnings.some((warning) => warning.includes("Conflicts were found"))).toBe(true);
|
||||
expect(plan.warnings).toEqual([
|
||||
"Secrets were detected but skipped. Re-run with --include-secrets to import supported API keys.",
|
||||
"Conflicts were found. Re-run with --overwrite to replace conflicting targets after item-level backups.",
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user