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:
JianFeeeee
2026-09-13 09:55:33 +08:00
parent c5b1242980
commit 93aa942e1e
2 changed files with 198 additions and 0 deletions

View File

@ -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,
}
}