mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:40:43 +00:00
test: mock agent runtime secret targets
This commit is contained in:
@@ -27,6 +27,14 @@ vi.mock("../config/io.js", () => ({
|
||||
readConfigFileSnapshotForWrite: readConfigFileSnapshotForWriteMock,
|
||||
}));
|
||||
|
||||
vi.mock("../cli/command-secret-targets.js", () => ({
|
||||
getAgentRuntimeCommandSecretTargetIds: (params?: { includeChannelTargets?: boolean }) =>
|
||||
new Set([
|
||||
"models.providers.*.apiKey",
|
||||
...(params?.includeChannelTargets === true ? ["channels.telegram.botToken"] : []),
|
||||
]),
|
||||
}));
|
||||
|
||||
const setRuntimeConfigSnapshotMock = vi.hoisted(() =>
|
||||
vi.fn<(cfg: OpenClawConfig, sourceConfig: OpenClawConfig) => void>(),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user