test: stipulate hermes migration warnings

This commit is contained in:
Shakker
2026-05-12 21:15:01 +01:00
parent bebb36caa5
commit fed2b9f132
3 changed files with 10 additions and 7 deletions

View File

@@ -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 () => {

View File

@@ -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 }));

View File

@@ -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.",
]);
});
});