test(biz): 添加测试中通路由统计用例
- 新增 Test_ZltxStatistics 测试函数- 验证 handleTask 处理中通订单统计逻辑 - 模拟订单诊断参数传递 - 测试通道数据接收与任务配置解析- 确保统计工具参数校验正确性
This commit is contained in:
parent
e82ecaf9f7
commit
50195474e7
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue