fix(matrix): reject malformed integer cli values · openclaw/openclaw@cb34175
steipete
·
2026-05-26
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -386,6 +386,20 @@ describe("matrix CLI verification commands", () => {
|
386 | 386 | expect(consoleLogMock).toHaveBeenCalledWith("Backup: active and trusted on this device"); |
387 | 387 | }); |
388 | 388 | |
| 389 | +it("rejects malformed Matrix self-verification timeout values", async () => { |
| 390 | +const program = buildProgram(); |
| 391 | + |
| 392 | +await program.parseAsync(["matrix", "verify", "self", "--timeout-ms", "5000ms"], { |
| 393 | +from: "user", |
| 394 | +}); |
| 395 | + |
| 396 | +expect(process.exitCode).toBe(1); |
| 397 | +expect(consoleErrorMock).toHaveBeenCalledWith( |
| 398 | +"Self-verification failed: --timeout-ms must be an integer", |
| 399 | +); |
| 400 | +expect(runMatrixSelfVerificationMock).not.toHaveBeenCalled(); |
| 401 | +}); |
| 402 | + |
389 | 403 | it("requests Matrix self-verification and prints the follow-up SAS commands", async () => { |
390 | 404 | requestMatrixVerificationMock.mockResolvedValue( |
391 | 405 | mockMatrixVerificationSummary({ |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。