test: update cli guidance assertions · openclaw/openclaw@59f75e7
shakkernerd
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -101,7 +101,7 @@ describe("acp cli option collisions", () => {
|
101 | 101 | name: "rejects mixed secret flags and file flags", |
102 | 102 | files: { token: "tok_file\n" }, |
103 | 103 | args: (tokenFile: string) => ["--token", "tok_inline", "--token-file", tokenFile], |
104 | | -expected: /Use either --token or --token-file/, |
| 104 | +expected: /Use either --token .*--token-file for Gateway token\./, |
105 | 105 | }, |
106 | 106 | { |
107 | 107 | name: "rejects mixed password flags and file flags", |
@@ -112,7 +112,7 @@ describe("acp cli option collisions", () => {
|
112 | 112 | "--password-file", |
113 | 113 | passwordFile, |
114 | 114 | ], |
115 | | -expected: /Use either --password or --password-file/, |
| 115 | +expected: /Use either --passw.*d .*--password-file for Gateway password\./, |
116 | 116 | }, |
117 | 117 | ])("$name", async ({ files, args, expected }) => { |
118 | 118 | await withTempSecretFiles("openclaw-acp-cli-", files, async ({ tokenFile, passwordFile }) => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -103,6 +103,8 @@ describe("runDaemonStatus", () => {
|
103 | 103 | ).rejects.toThrow("__exit__:1"); |
104 | 104 | |
105 | 105 | expect(gatherDaemonStatus).not.toHaveBeenCalled(); |
106 | | -expect(runtimeErrors.join("\n")).toContain("--require-rpc cannot be used with --no-probe"); |
| 106 | +expect(runtimeErrors[0]).toBe( |
| 107 | +"Gateway status failed: --require-rpc needs probing enabled. Remove --no-probe or drop --require-rpc.", |
| 108 | +); |
107 | 109 | }); |
108 | 110 | }); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -538,7 +538,9 @@ describe("devices cli tokens", () => {
|
538 | 538 | await runDevicesCommand(["rotate", "--device", " ", "--role", "main"]); |
539 | 539 | |
540 | 540 | expect(callGateway).not.toHaveBeenCalled(); |
541 | | -expect(runtime.error).toHaveBeenCalledWith("--device and --role required"); |
| 541 | +expect(runtime.error).toHaveBeenCalledWith( |
| 542 | +"--device and --role are required. Run openclaw devices list to choose a paired device.", |
| 543 | +); |
542 | 544 | expect(runtime.exit).toHaveBeenCalledWith(1); |
543 | 545 | }); |
544 | 546 | }); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -716,7 +716,7 @@ describe("applyAuthChoice", () => {
|
716 | 716 | setDefaultModel: true, |
717 | 717 | }), |
718 | 718 | ).rejects.toThrow( |
719 | | -'Auth choice "openai-codex-import" is no longer supported. Use "openai-codex" instead.', |
| 719 | +'Auth choice "openai-codex-import" is no longer supported. Use "openai-codex" instead, or run openclaw onboard to choose interactively.', |
720 | 720 | ); |
721 | 721 | } finally { |
722 | 722 | spy.mockRestore(); |
@@ -739,7 +739,7 @@ describe("applyAuthChoice", () => {
|
739 | 739 | setDefaultModel: true, |
740 | 740 | }), |
741 | 741 | ).rejects.toThrow( |
742 | | -'Auth choice "legacy\\u001b[31mchoice" is no longer supported. Use "modern\\nchoice" instead.', |
| 742 | +'Auth choice "legacy\\u001b[31mchoice" is no longer supported. Use "modern\\nchoice" instead, or run openclaw onboard to choose interactively.', |
743 | 743 | ); |
744 | 744 | } finally { |
745 | 745 | spy.mockRestore(); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。