test(biz): 添加测试中通路由统计用例

- 新增 Test_ZltxStatistics 测试函数- 验证 handleTask 处理中通订单统计逻辑
- 模拟订单诊断参数传递
- 测试通道数据接收与任务配置解析- 确保统计工具参数校验正确性
This commit is contained in:
wuchao 2025-09-24 09:51:51 +08:00
parent e82ecaf9f7
commit 50195474e7
1 changed files with 8 additions and 0 deletions

View File

@ -61,6 +61,14 @@ func Test_ProductLog(t *testing.T) {
t.Log(err)
}
func Test_ZltxStatistics(t *testing.T) {
routerBiz := in()
ch := make(chan entitys.ResponseData, 5)
defer close(ch)
err := routerBiz.handleTask(ch, nil, &entitys.Match{Index: "order_diagnosis", Parameters: `{"number":"15583730896"}`}, &model.AiTask{Config: `{"tool": "zltxOrderStatistics", "param": {"type": "object", "optional": [], "required": ["number"], "properties": {"number": {"type": "string", "description": "充值账号/分销商ID"}}}}`})
t.Log(err)
}
func in() *AiRouterBiz {
modDir, err := getModuleDir()