fix migrate auth opt-out precedence · openclaw/openclaw@2016a51
fuller-stack
·
2026-05-25
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -617,6 +617,32 @@ describe("migrateApplyCommand", () => {
|
617 | 617 | expect(mocks.provider.apply).toHaveBeenCalledTimes(1); |
618 | 618 | }); |
619 | 619 | |
| 620 | +it("lets --no-auth-credentials override explicit secret import", async () => { |
| 621 | +const planned = authPlan("skipped"); |
| 622 | +const applied: MigrationApplyResult = { |
| 623 | + ...planned, |
| 624 | +items: planned.items, |
| 625 | +}; |
| 626 | +mocks.provider.plan.mockImplementation(async (ctx) => { |
| 627 | +expect(ctx.includeSecrets).toBe(false); |
| 628 | +return planned; |
| 629 | +}); |
| 630 | +mocks.provider.apply.mockImplementation(async (ctx) => { |
| 631 | +expect(ctx.includeSecrets).toBe(false); |
| 632 | +return applied; |
| 633 | +}); |
| 634 | + |
| 635 | +await migrateApplyCommand(runtime, { |
| 636 | +provider: "hermes", |
| 637 | +yes: true, |
| 638 | +includeSecrets: true, |
| 639 | +authCredentials: false, |
| 640 | +}); |
| 641 | + |
| 642 | +expect(mocks.provider.plan).toHaveBeenCalledTimes(1); |
| 643 | +expect(mocks.provider.apply).toHaveBeenCalledTimes(1); |
| 644 | +}); |
| 645 | + |
620 | 646 | it("prompts for Codex skills before interactive default apply", async () => { |
621 | 647 | Object.defineProperty(process.stdin, "isTTY", { |
622 | 648 | configurable: true, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。