test(agents): isolate client tool policy hook e2e · openclaw/openclaw@14336e3
vincentkoc
·
2026-05-07
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,7 @@ import {
|
11 | 11 | import { addTestHook, createMockPluginRegistry } from "../plugins/hooks.test-helpers.js"; |
12 | 12 | import { patchPluginSessionExtension } from "../plugins/host-hook-state.js"; |
13 | 13 | import { createEmptyPluginRegistry } from "../plugins/registry.js"; |
14 | | -import { setActivePluginRegistry } from "../plugins/runtime.js"; |
| 14 | +import { resetPluginRuntimeStateForTest, setActivePluginRegistry } from "../plugins/runtime.js"; |
15 | 15 | import type { PluginHookRegistration } from "../plugins/types.js"; |
16 | 16 | |
17 | 17 | type ToolDefinitionAdapterModule = typeof import("./pi-tool-definition-adapter.js"); |
@@ -326,6 +326,7 @@ describe("before_tool_call hook deduplication (#15502)", () => {
|
326 | 326 | describe("before_tool_call hook integration for client tools", () => { |
327 | 327 | beforeEach(() => { |
328 | 328 | resetGlobalHookRunner(); |
| 329 | +resetPluginRuntimeStateForTest(); |
329 | 330 | resetDiagnosticSessionStateForTest(); |
330 | 331 | installBeforeToolCallHook(); |
331 | 332 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。