fix: split workbench core mysql access
This commit is contained in:
@@ -27,3 +27,28 @@ func TestFallbackTableAnalysisUnparsedProfile(t *testing.T) {
|
||||
t.Fatalf("last metric value=%q, want 未解析", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFallbackDocumentBuildsDisplayableContent(t *testing.T) {
|
||||
result := fallbackDocument(
|
||||
"生成一个竞争销售部门副科长职位的演讲稿",
|
||||
"竞争销售部门副科长职位演讲稿",
|
||||
"meeting_minutes",
|
||||
Usage{Model: "deepseek-flash"},
|
||||
"AI 输出格式异常,已使用兜底文档。",
|
||||
)
|
||||
if result.Title != "竞争销售部门副科长职位演讲稿" {
|
||||
t.Fatalf("Title=%q, want title hint", result.Title)
|
||||
}
|
||||
if strings.TrimSpace(result.ContentMarkdown) == "" {
|
||||
t.Fatal("ContentMarkdown is empty")
|
||||
}
|
||||
if !strings.Contains(result.ContentMarkdown, "AI 输出格式异常") {
|
||||
t.Fatalf("ContentMarkdown=%q, want fallback reason", result.ContentMarkdown)
|
||||
}
|
||||
if !strings.Contains(result.ContentPlain, "生成一个竞争销售部门副科长职位的演讲稿") {
|
||||
t.Fatalf("ContentPlain=%q, want source text", result.ContentPlain)
|
||||
}
|
||||
if len(result.Sections) != 3 {
|
||||
t.Fatalf("Sections len=%d, want 3", len(result.Sections))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user