test: specify doctor warning text

This commit is contained in:
Shakker
2026-05-11 20:11:32 +01:00
parent 6b32f6f283
commit 8e75adebe3
2 changed files with 11 additions and 10 deletions

View File

@@ -118,11 +118,13 @@ describe("collectCodexNativeAssetWarnings", () => {
env: { CODEX_HOME: codexHome, HOME: root },
});
expect(warnings).toHaveLength(1);
expect(warnings[0]).toContain("isolated per-agent Codex homes");
expect(warnings[0]).toContain(codexHome);
expect(warnings[0]).toContain(path.join(root, ".agents", "skills"));
expect(warnings[0]).toContain("openclaw migrate codex --dry-run");
expect(warnings[0]).toContain("manual-review only");
expect(warnings).toStrictEqual([
[
"- Personal Codex CLI assets were found, but native Codex-mode OpenClaw agents use isolated per-agent Codex homes.",
`- Sources: ${codexHome} and ${path.join(root, ".agents", "skills")} (1 skill, 0 plugins, 0 config files, 0 hook files).`,
"- These assets will not be loaded by the Codex app-server child unless you intentionally promote them.",
"- Run `openclaw migrate codex --dry-run` to inventory them. Applying that migration copies skills into the current OpenClaw agent workspace; Codex plugins, hooks, and config stay manual-review only.",
].join("\n"),
]);
});
});

View File

@@ -395,10 +395,9 @@ describe("plugin registry install migration", () => {
action: "migrate",
force: true,
});
expect(result.deprecationWarnings).toHaveLength(1);
expect(result.deprecationWarnings[0]).toContain(
`${FORCE_PLUGIN_REGISTRY_MIGRATION_ENV} is deprecated`,
);
expect(result.deprecationWarnings).toStrictEqual([
`${FORCE_PLUGIN_REGISTRY_MIGRATION_ENV} is deprecated and will be removed after the plugin registry migration rollout; use doctor registry repair once available.`,
]);
});
it("treats falsey env flag strings as unset", async () => {