test: route extension tests through sdk seams

This commit is contained in:
Peter Steinberger
2026-04-27 22:34:12 +01:00
parent 46ba8e7cce
commit a8c548f4f3
16 changed files with 60 additions and 87 deletions

View File

@@ -2,6 +2,11 @@ import { mkdtempSync, writeFileSync } from "node:fs";
import os from "node:os";
import path from "node:path";
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";
import {
finalizeDebugProxyCapture,
getDebugProxyCaptureStore,
initializeDebugProxyCapture,
} from "openclaw/plugin-sdk/proxy-capture";
import { afterEach, describe, expect, it, vi } from "vitest";
import { installDebugProxyTestResetHooks } from "../test-support/debug-proxy-env-test-helpers.js";
@@ -81,7 +86,6 @@ describe("listMicrosoftVoices", () => {
new Response(JSON.stringify([{ ShortName: "en-US-AvaNeural" }]), { status: 200 }),
) as unknown as typeof globalThis.fetch;
const { getDebugProxyCaptureStore } = await import("../../src/proxy-capture/store.sqlite.js");
const store = getDebugProxyCaptureStore(
process.env.OPENCLAW_DEBUG_PROXY_DB_PATH,
process.env.OPENCLAW_DEBUG_PROXY_BLOB_DIR,
@@ -122,9 +126,6 @@ describe("listMicrosoftVoices", () => {
async () => new Response(JSON.stringify([{ ShortName: "en-US-AvaNeural" }]), { status: 200 }),
) as unknown as typeof globalThis.fetch;
const { getDebugProxyCaptureStore } = await import("../../src/proxy-capture/store.sqlite.js");
const { finalizeDebugProxyCapture, initializeDebugProxyCapture } =
await import("../../src/proxy-capture/runtime.js");
const store = getDebugProxyCaptureStore(
process.env.OPENCLAW_DEBUG_PROXY_DB_PATH,
process.env.OPENCLAW_DEBUG_PROXY_BLOB_DIR,