























@@ -584,11 +584,16 @@ describe("updatePluginsAfterCoreUpdate (invalid config end-to-end)", () => {
584584expect(result.status).toBe("error");
585585expect(result.reason).toBe("invalid-config");
586586expect(result.changed).toBe(false);
587-expect(result.warnings).toEqual([
588-expect.objectContaining({
587+expect(result.warnings).toStrictEqual([
588+{
589589reason: "invalid-config",
590-guidance: expect.arrayContaining([expect.stringContaining("openclaw doctor")]),
591-}),
590+message:
591+"Plugin post-update convergence skipped because the config is invalid; refusing to restart the gateway with an unverified plugin set.",
592+guidance: [
593+"Run `openclaw doctor` to inspect the config validation errors.",
594+"Once the config parses, rerun `openclaw update`.",
595+],
596+},
592597]);
593598});
594599});
@@ -603,19 +608,19 @@ describe("buildInvalidConfigPostCoreUpdateResult", () => {
603608604609it("surfaces actionable repair guidance in both the structural warnings and the message string", () => {
605610const built = buildInvalidConfigPostCoreUpdateResult();
606-expect(built.guidance).toEqual(
607-expect.arrayContaining([
608-expect.stringContaining("openclaw doctor"),
609-expect.stringContaining("openclaw update"),
610-]),
611-);
612-expect(built.result.warnings).toEqual([
611+expect(built.guidance).toStrictEqual([
612+"Run `openclaw doctor` to inspect the config validation errors.",
613+"Once the config parses, rerun `openclaw update`.",
614+]);
615+expect(built.result.warnings).toStrictEqual([
613616{
614617reason: "invalid-config",
615618message: built.message,
616619guidance: built.guidance,
617620},
618621]);
619-expect(built.message).toMatch(/refusing to restart/);
622+expect(built.message).toBe(
623+"Plugin post-update convergence skipped because the config is invalid; refusing to restart the gateway with an unverified plugin set.",
624+);
620625});
621626});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。