cli tests: TestAgentQwenDefault expects the model's name as Names in agents' lists gives it

6fa3109ea made Qwen's modelProviders entry name the model as
provider.Labels does ("m · A"), not "magpie/a/m", and ran agent, gui and
provider but not internal/cli, whose TestAgentQwenDefault still asked for
the old name. main has been red on ubuntu and macOS since (run for
9492e5db8). The entry is still found by its id, which the test checks too.

Run: go test -tags nogui -count=1 ./internal/cli (ok, 145s); gofmt -l
clean. On origin/main before this change the same test failed with
"name": "magpie/a/m" missing.
This commit is contained in:
yetone
2026-10-13 14:41:10 +08:00
parent ab1006bb80
commit 494609866b
+1 -1
View File
@@ -46,7 +46,7 @@ func TestAgentQwenDefault(t *testing.T) {
t.Fatal(err)
}
s := read()
for _, want := range []string{`"id": "a/m"`, `"name": "magpie/a/m"`, `"MAGPIE_QWEN_API_KEY"`, `"selectedType": "openai"`, `"baseUrl": "https://idealab.example.com/v1"`, `"outputLanguage": "zh-CN"`} {
for _, want := range []string{`"id": "a/m"`, `"name": "m · A"`, `"MAGPIE_QWEN_API_KEY"`, `"selectedType": "openai"`, `"baseUrl": "https://idealab.example.com/v1"`, `"outputLanguage": "zh-CN"`} {
if !strings.Contains(s, want) {
t.Fatalf("not wired (%s missing):\n%s", want, s)
}