test(msteams): add keyed store to file consent runtime stub

This commit is contained in:
Peter Steinberger
2026-05-31 18:24:42 +01:00
parent 1a65425a6e
commit 2b4f3e47b6

View File

@@ -1,6 +1,8 @@
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import type { OpenKeyedStoreOptions } from "openclaw/plugin-sdk/plugin-state-runtime";
import { createPluginStateKeyedStoreForTests } from "openclaw/plugin-sdk/plugin-state-test-runtime";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { PluginRuntime } from "../runtime-api.js";
import { runMSTeamsFileConsentInvokeHandler } from "./file-consent-invoke.js";
@@ -45,6 +47,8 @@ function createRuntimeStub(stateDir?: string): PluginRuntime {
},
},
state: {
openKeyedStore: (options: OpenKeyedStoreOptions) =>
createPluginStateKeyedStoreForTests("msteams", options),
resolveStateDir: (env?: NodeJS.ProcessEnv) => {
const override = env?.OPENCLAW_STATE_DIR?.trim();
if (override) {