mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-21 17:38:10 +00:00
test: PluginManager 接口含 ReloadOne 的编译期契约验证
This commit is contained in:
@ -2,6 +2,8 @@ package plugin
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
sdk "gitcode.com/JianFeeeee/HomeAgent/internal/sdk"
|
||||
)
|
||||
|
||||
func TestExtractDescription(t *testing.T) {
|
||||
@ -195,3 +197,8 @@ A tool with no parameters`
|
||||
t.Errorf("expected no params, got %d", len(props))
|
||||
}
|
||||
}
|
||||
|
||||
func TestPluginManagerInterfaceReloadOne(t *testing.T) {
|
||||
// 编译期契约:Registry 必须实现 PluginManager(含 ReloadOne 单插件重载)。
|
||||
var _ sdk.PluginManager = (*Registry)(nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user