Fix test environment regressions on main

This commit is contained in:
Tak Hoffman
2026-03-14 14:24:15 -05:00
parent bb06dc7cc9
commit b49e1386d0
6 changed files with 81 additions and 8 deletions

View File

@@ -6,6 +6,7 @@ import { useFastShortTimeouts } from "../../test/helpers/fast-short-timeouts.js"
import type { OpenClawConfig } from "../config/config.js";
import { getMemorySearchManager, type MemoryIndexManager } from "./index.js";
import { createOpenAIEmbeddingProviderMock } from "./test-embeddings-mock.js";
import { mockPublicPinnedHostname } from "./test-helpers/ssrf.js";
import "./test-runtime-mocks.js";
const embedBatch = vi.fn(async (_texts: string[]) => [] as number[][]);
@@ -174,6 +175,7 @@ describe("memory indexing with OpenAI batches", () => {
const { fetchMock } = createOpenAIBatchFetchMock();
vi.stubGlobal("fetch", fetchMock);
mockPublicPinnedHostname();
try {
if (!manager) {
@@ -216,6 +218,7 @@ describe("memory indexing with OpenAI batches", () => {
});
vi.stubGlobal("fetch", fetchMock);
mockPublicPinnedHostname();
try {
if (!manager) {
@@ -255,6 +258,7 @@ describe("memory indexing with OpenAI batches", () => {
});
vi.stubGlobal("fetch", fetchMock);
mockPublicPinnedHostname();
try {
if (!manager) {