fix: parse feishu timeout env strictly · openclaw/openclaw@99f7028
steipete
·
2026-05-29
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -322,6 +322,21 @@ describe("createFeishuClient HTTP timeout", () => {
|
322 | 322 | await expectGetCallTimeout(60_000); |
323 | 323 | }); |
324 | 324 | |
| 325 | +it("ignores non-decimal env timeout overrides", async () => { |
| 326 | +for (const value of ["0x10", "1e3", "10.5"]) { |
| 327 | +process.env[FEISHU_HTTP_TIMEOUT_ENV_VAR] = value; |
| 328 | + |
| 329 | +createFeishuClient({ |
| 330 | +appId: `app-${value}`, |
| 331 | +appSecret: "secret-env-timeout", // pragma: allowlist secret |
| 332 | +accountId: `timeout-env-invalid-${value}`, |
| 333 | +}); |
| 334 | + |
| 335 | +await expectGetCallTimeout(FEISHU_HTTP_TIMEOUT_MS); |
| 336 | +mockBaseHttpInstance.get.mockClear(); |
| 337 | +} |
| 338 | +}); |
| 339 | + |
325 | 340 | it("prefers direct timeout over env override", async () => { |
326 | 341 | process.env[FEISHU_HTTP_TIMEOUT_ENV_VAR] = "60000"; |
327 | 342 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。