From 824b5e4d91cb79e2fa41189d037b6aee29475dc5 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 17 Apr 2026 08:00:03 +0100 Subject: [PATCH] test: mock agent runtime secret targets --- src/commands/agent.runtime-config.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/commands/agent.runtime-config.test.ts b/src/commands/agent.runtime-config.test.ts index 7bee7031e9b..88df3f8dd29 100644 --- a/src/commands/agent.runtime-config.test.ts +++ b/src/commands/agent.runtime-config.test.ts @@ -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>(), );