test: pin gateway client logs · openclaw/openclaw@29f85ca
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -513,10 +513,10 @@ describe("GatewayClient request errors", () => {
|
513 | 513 | expect(onConnectError).not.toHaveBeenCalled(); |
514 | 514 | expect(onClose).not.toHaveBeenCalled(); |
515 | 515 | expect(ws.lastClose).toEqual({ code: 1013, reason: "gateway starting" }); |
516 | | -expect(logDebugMock).toHaveBeenCalledWith(expect.stringContaining("gateway connect failed:")); |
517 | | -expect(logErrorMock).not.toHaveBeenCalledWith( |
518 | | - expect.stringContaining("gateway connect failed:"), |
519 | | -); |
| 516 | +expect(logDebugMock.mock.calls).toEqual([ |
| 517 | + ["gateway connect failed: GatewayClientRequestError: gateway starting; retry shortly"], |
| 518 | +]); |
| 519 | +expect(logErrorMock.mock.calls).toEqual([]); |
520 | 520 | expect(wsInstances).toHaveLength(1); |
521 | 521 | |
522 | 522 | await vi.advanceTimersByTimeAsync(249); |
@@ -568,7 +568,7 @@ describe("GatewayClient close handling", () => {
|
568 | 568 | expect(getLatestWs().emitClose(1008, "unauthorized: device token mismatch")).toBeUndefined(); |
569 | 569 | |
570 | 570 | expect(logDebugMock).toHaveBeenCalledWith( |
571 | | -expect.stringContaining("failed clearing stale device-auth token"), |
| 571 | +"failed clearing stale device-auth token for device dev-2: Error: disk unavailable", |
572 | 572 | ); |
573 | 573 | expect(onClose).toHaveBeenCalledWith(1008, "unauthorized: device token mismatch"); |
574 | 574 | client.stop(); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。