test: fix main ci shard routing · openclaw/openclaw@9207660
steipete
·
2026-04-28
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -import { beforeEach, describe, expect, it, vi } from "vitest"; |
| 1 | +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; |
2 | 2 | import type { |
3 | 3 | PluginHookGatewayContext, |
4 | 4 | PluginHookGatewayStartEvent, |
@@ -184,6 +184,8 @@ type PostAttachRuntimeDeps = NonNullable<Parameters<typeof startGatewayPostAttac
|
184 | 184 | |
185 | 185 | describe("startGatewayPostAttachRuntime", () => { |
186 | 186 | beforeEach(() => { |
| 187 | +vi.stubEnv("OPENCLAW_SKIP_CHANNELS", "0"); |
| 188 | +vi.stubEnv("OPENCLAW_SKIP_PROVIDERS", "0"); |
187 | 189 | hoisted.startPluginServices.mockClear(); |
188 | 190 | hoisted.startGmailWatcherWithLogs.mockClear(); |
189 | 191 | hoisted.loadInternalHooks.mockClear(); |
@@ -215,6 +217,10 @@ describe("startGatewayPostAttachRuntime", () => {
|
215 | 217 | hoisted.ensureOpenClawModelsJson.mockResolvedValue(undefined); |
216 | 218 | }); |
217 | 219 | |
| 220 | +afterEach(() => { |
| 221 | +vi.unstubAllEnvs(); |
| 222 | +}); |
| 223 | + |
218 | 224 | it("re-enables startup-gated methods after post-attach sidecars start", async () => { |
219 | 225 | const unavailableGatewayMethods = new Set<string>(["chat.history", "models.list"]); |
220 | 226 | const onSidecarsReady = vi.fn(); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。