gui tests: a found group's old id reaches the group it was renamed to

00af08e7b made a renamed group answer to its old id (Former), so
TestGroupSaveRenames' "auto-gpt-6-astra is back" went red: FindGroup of
the old id now finds the renamed group, as it is meant to. The check is
now that what answers is gpt-6-astra, never a found auto- group back.

Run (mote): go test ./internal/gui ok, ./internal/usage ok; red at
3d49ac069 before this, 00af08e7b's own suite never ran (its log empty).
This commit is contained in:
yetone
2026-11-10 02:01:37 +08:00
parent 117f56c707
commit f5a2edfd1c
+4 -2
View File
@@ -42,8 +42,10 @@ func TestGroupSaveRenames(t *testing.T) {
if !ok || g.Name != "Astra" || g.Routing != provider.Ordered {
t.Fatalf("%v %+v", ok, g)
}
if _, _, ok := provider.FindGroup("group/auto-gpt-6-astra"); ok {
t.Fatal("auto-gpt-6-astra is back")
// the old id answers with the renamed group (00af08e7b), never a found
// auto- group come back
if g, _, ok := provider.FindGroup("group/auto-gpt-6-astra"); ok && g.ID != "gpt-6-astra" {
t.Fatalf("auto-gpt-6-astra is back: %+v", g)
}
// a save without a new id stays a save
if w := post(`{"id":"gpt-6-astra","from":"gpt-6-astra","name":"Astra 2",` + members + `}`); w.Code != 200 {