mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 04:10:44 +00:00
25 lines
847 B
TypeScript
25 lines
847 B
TypeScript
import { vi } from "vitest";
|
|
import { loadBundledChannelSecretContractApi } from "./channel-contract-api.js";
|
|
|
|
const nextcloudTalkSecrets = loadBundledChannelSecretContractApi("nextcloud-talk");
|
|
if (!nextcloudTalkSecrets?.collectRuntimeConfigAssignments) {
|
|
throw new Error("Missing Nextcloud Talk secret contract api");
|
|
}
|
|
|
|
vi.mock("../channels/plugins/bootstrap-registry.js", () => ({
|
|
getBootstrapChannelPlugin: (id: string) =>
|
|
id === "nextcloud-talk"
|
|
? {
|
|
secrets: {
|
|
collectRuntimeConfigAssignments: nextcloudTalkSecrets.collectRuntimeConfigAssignments,
|
|
},
|
|
}
|
|
: undefined,
|
|
getBootstrapChannelSecrets: (id: string) =>
|
|
id === "nextcloud-talk"
|
|
? {
|
|
collectRuntimeConfigAssignments: nextcloudTalkSecrets.collectRuntimeConfigAssignments,
|
|
}
|
|
: undefined,
|
|
}));
|