From f5a2edfd1c9d895624dcf76e635c4ba9abf79dfd Mon Sep 17 00:00:00 2001 From: yetone Date: Tue, 10 Nov 2026 02:01:33 +0800 Subject: [PATCH] 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). --- internal/gui/groups_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/gui/groups_test.go b/internal/gui/groups_test.go index 9ce3ecfbc..494f310a3 100644 --- a/internal/gui/groups_test.go +++ b/internal/gui/groups_test.go @@ -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 {