test(runtime): wire new pricing importers into pipeline smoke and catalog mapping

This commit is contained in:
phamnazage-jpg
2026-05-23 18:35:08 +08:00
parent e757cd2dd7
commit c32661fd2a
15 changed files with 299 additions and 144 deletions

View File

@@ -20,17 +20,20 @@ func TestParseYoudaoPricingCatalogBuildsRecords(t *testing.T) {
if err != nil {
t.Fatalf("parseYoudaoPricingCatalog 返回错误: %v", err)
}
if len(records) != 5 {
t.Fatalf("期望 5 条有道价格记录,实际 %d", len(records))
if len(records) != 10 {
t.Fatalf("期望 10 条有道价格记录,实际 %d", len(records))
}
if records[0].ModelID != "youdao-deepseek-v4-flash" {
t.Fatalf("首条 modelID 错误: %q", records[0].ModelID)
}
if records[2].ProviderName != "Moonshot AI" {
t.Fatalf("Kimi provider 归一化错误: %q", records[2].ProviderName)
if records[5].ProviderName != "Moonshot AI" {
t.Fatalf("Kimi provider 归一化错误: %q", records[5].ProviderName)
}
if records[4].ContextLength != 128000 {
t.Fatalf("GLM-5 上下文长度错误: %d", records[4].ContextLength)
if records[8].ProviderName != "Zhipu AI" {
t.Fatalf("智谱 provider 归一化错误: %q", records[8].ProviderName)
}
if records[8].ContextLength != 200000 {
t.Fatalf("GLM-5 上下文长度错误: %d", records[8].ContextLength)
}
}
@@ -47,7 +50,7 @@ func TestRunYoudaoPricingImportDryRunPrintsSummary(t *testing.T) {
output := out.String()
for _, want := range []string{
"source=youdao-pricing-import",
"models=5",
"models=10",
"operator=Youdao Zhiyun MaaS",
"dry_run=true",
} {