test: isolate ollama discovery catalog cache

This commit is contained in:
Shakker
2026-05-09 07:54:53 +01:00
parent 39a6f3fa47
commit dbb62f21f4

View File

@@ -2,6 +2,7 @@ import { mkdtempSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";
import { clearLiveCatalogCacheForTests } from "openclaw/plugin-sdk/provider-catalog-shared";
import type { ModelDefinitionConfig } from "openclaw/plugin-sdk/provider-onboard";
import { withFetchPreconnect } from "openclaw/plugin-sdk/test-env";
import { afterEach, describe, expect, it, vi } from "vitest";
@@ -10,6 +11,7 @@ import { ollamaProviderDiscovery } from "./provider-discovery.js";
const OLLAMA_LOCAL_AUTH_MARKER = "ollama-local";
afterEach(() => {
clearLiveCatalogCacheForTests();
vi.unstubAllEnvs();
vi.unstubAllGlobals();
});