gui tests: a found group's old id reaches the group it was renamed to
00af08e7bmade 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 at3d49ac069before this, 00af08e7b's own suite never ran (its log empty).
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user