mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-21 09:28:14 +00:00
test(plugins): deepsearch E2E 不再带走共享搜索后端(附回归判据)
背景:E2E 临时目录里拉起的插件实例在 teardown 时执行了 `docker compose stop -t 2`,
把线上正在用的 SearXNG 关掉,表现为「搜索后端起不来」。
- integration_test.go:把 ConfigRegistry 暴露给测试环境(其余不变)
- deepsearch_e2e_test.go:
- forbidStoppingSharedBackend:测试实例一律 stop_searxng_on_exit=false
(配置表按内核约定先 RegisterDef 再 Set)
- 新增 TestRealPlugin_DeepSearchKeepsSharedBackendOnStop:停掉插件实例后,
6 秒内 healthz 必须始终 200 —— 判据落在网络层,直接钉住「跑测试不能断线上搜索」
验证:三条 E2E 全过,且跑完 healthz 仍 200、容器 StartedAt 未变(未重启)。
This commit is contained in:
@ -28,6 +28,7 @@ type testPluginEnv struct {
|
||||
memDB *memory.GraphDB
|
||||
ks *knowledge.Store
|
||||
docStore *doc.Store
|
||||
cfgReg *internalConfig.ConfigRegistry
|
||||
}
|
||||
|
||||
func setupIntegration(t *testing.T) *testPluginEnv {
|
||||
@ -101,6 +102,7 @@ func setupIntegrationWithProvider(t *testing.T, pm *agentAPI.ProviderManager) *t
|
||||
memDB: memDB,
|
||||
ks: ks,
|
||||
docStore: docStore,
|
||||
cfgReg: cfgReg,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user