mirror of https://github.com/openclaw/openclaw.git
fix: avoid eager web provider config reads
This commit is contained in:
parent
0b8336f49d
commit
22db77d2b6
|
|
@ -2,6 +2,7 @@ import { EnvHttpProxyAgent } from "undici";
|
|||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { createEmptyPluginRegistry } from "../../plugins/registry.js";
|
||||
import { setActivePluginRegistry } from "../../plugins/runtime.js";
|
||||
import { clearSecretsRuntimeSnapshot } from "../../secrets/runtime.js";
|
||||
import { withFetchPreconnect } from "../../test-utils/fetch-mock.js";
|
||||
import { __testing as webSearchTesting } from "./web-search.js";
|
||||
import { createWebFetchTool, createWebSearchTool } from "./web-tools.js";
|
||||
|
|
@ -152,8 +153,14 @@ function createProviderSuccessPayload(
|
|||
};
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
setActivePluginRegistry(createEmptyPluginRegistry());
|
||||
clearSecretsRuntimeSnapshot();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
setActivePluginRegistry(createEmptyPluginRegistry());
|
||||
clearSecretsRuntimeSnapshot();
|
||||
});
|
||||
|
||||
describe("web tools defaults", () => {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ function buildWebFetchSnapshotCacheKey(params: {
|
|||
onlyPluginIds: [...new Set(params.onlyPluginIds ?? [])].toSorted((left, right) =>
|
||||
left.localeCompare(right),
|
||||
),
|
||||
config: params.config ?? null,
|
||||
env: buildPluginSnapshotCacheEnvKey(params.env),
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ function buildWebSearchSnapshotCacheKey(params: {
|
|||
onlyPluginIds: [...new Set(params.onlyPluginIds ?? [])].toSorted((left, right) =>
|
||||
left.localeCompare(right),
|
||||
),
|
||||
config: params.config ?? null,
|
||||
env: buildPluginSnapshotCacheEnvKey(params.env),
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue