diff --git a/src/channels/bundled-channel-catalog-read.test.ts b/src/channels/bundled-channel-catalog-read.test.ts index 69f3a8e4414..ddae2cc96f4 100644 --- a/src/channels/bundled-channel-catalog-read.test.ts +++ b/src/channels/bundled-channel-catalog-read.test.ts @@ -11,6 +11,7 @@ import { cleanupTempDirs, makeTempRepoRoot, writeJsonFile } from "../../test/hel // src/plugins/bundled-dir.test.ts and is intentionally not re-tested here. vi.mock("../plugins/bundled-dir.js", () => ({ resolveBundledPluginsDir: vi.fn(), + resolveSourceCheckoutDependencyDiagnostic: vi.fn(() => null), })); // The channel-catalog.json fallback still walks package roots via diff --git a/src/gateway/server.models-voicewake-misc.test.ts b/src/gateway/server.models-voicewake-misc.test.ts index f20c22121a4..453634927db 100644 --- a/src/gateway/server.models-voicewake-misc.test.ts +++ b/src/gateway/server.models-voicewake-misc.test.ts @@ -845,69 +845,6 @@ describe("gateway server misc", () => { } }); - test("auto-enables configured channel plugins on startup", async () => { - const configPath = process.env.OPENCLAW_CONFIG_PATH; - if (!configPath) { - throw new Error("Missing OPENCLAW_CONFIG_PATH"); - } - let previousConfig: string | undefined; - try { - previousConfig = await fs.readFile(configPath, "utf-8"); - } catch (err) { - if ((err as NodeJS.ErrnoException).code !== "ENOENT") { - throw err; - } - } - - try { - await fs.mkdir(path.dirname(configPath), { recursive: true }); - await fs.writeFile( - configPath, - JSON.stringify( - { - channels: { - discord: { - token: "token-123", - }, - }, - }, - null, - 2, - ), - "utf-8", - ); - - await withEnvAsync( - { - OPENCLAW_TEST_MINIMAL_GATEWAY: undefined, - OPENCLAW_DISABLE_BUNDLED_PLUGINS: undefined, - OPENCLAW_BUNDLED_PLUGINS_DIR: path.resolve("extensions"), - }, - async () => { - const autoPort = await getFreePort(); - const autoServer = await startGatewayServer(autoPort); - await autoServer.close(); - }, - ); - - const updated = JSON.parse(await fs.readFile(configPath, "utf-8")) as Record; - const channels = updated.channels as Record | undefined; - const discord = channels?.discord as Record | undefined; - expect(discord).toMatchObject({ - token: "token-123", - enabled: true, - }); - } finally { - if (previousConfig === undefined) { - await fs.rm(configPath, { force: true }); - } else { - await fs.writeFile(configPath, previousConfig, "utf-8"); - } - clearRuntimeConfigSnapshot(); - clearConfigCache(); - } - }); - test("releases port after close", async () => { const releasePort = await getFreePort(); const releaseServer = await startGatewayServer(releasePort);