console store tests: fixture people on .test/.invalid domains; the exam search has its single match back
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+8
−8
internal/console/opstore_test.go+8 −8
CI cancelled — superseded by a newer push — run details
diff --git a/internal/console/opstore_test.go b/internal/console/opstore_test.go| index a3d8ed537..84c985cf2 100644 |
| --- a/internal/console/opstore_test.go |
| +++ b/internal/console/opstore_test.go |
| @@ -431,18 +431,18 @@ func TestNewPeoplePerDayFillsZeroDaysAndIgnoresFuture(t *testing.T) { |
| func TestNewestPeopleAndPeoplePage(t *testing.T) { |
| s := openOpStore(t) |
| - for i, a := range []string{"ann@example.com", "bob@example.org", "cy@example.net", "di@example.org", "ed@example.net"} { |
| + for i, a := range []string{"ann@example.com", "bob@shop.test", "cy@studio.test", "di@demo.invalid", "ed@notes.test"} { |
| opUser(t, s, a, opNow.Add(time.Duration(i-10)*time.Hour)) |
| } |
| acct := testAccountID() |
| - opMust(t, s.CreateAccount(acct, "aaaa", "shop", "ed@example.net", opNow.Add(-time.Hour))) |
| - if _, err := s.CreateAppIn(acct, "shop", "ed@example.net", opNow); err != nil { |
| + opMust(t, s.CreateAccount(acct, "aaaa", "shop", "ed@notes.test", opNow.Add(-time.Hour))) |
| + if _, err := s.CreateAppIn(acct, "shop", "ed@notes.test", opNow); err != nil { |
| t.Fatal(err) |
| } |
| - opMust(t, s.TouchLastSeen("ed@example.net", opNow)) |
| + opMust(t, s.TouchLastSeen("ed@notes.test", opNow)) |
| newest, err := s.NewestPeople(2) |
| opMust(t, err) |
| - if len(newest) != 2 || newest[0].Address != "ed@example.net" || newest[1].Address != "di@example.org" { |
| + if len(newest) != 2 || newest[0].Address != "ed@notes.test" || newest[1].Address != "di@demo.invalid" { |
| t.Fatalf("NewestPeople(2) = %+v", newest) |
| } |
| ed := newest[0] |
| @@ -455,7 +455,7 @@ func TestNewestPeopleAndPeoplePage(t *testing.T) { |
| } |
| page, total, err := s.PeoplePage("", 0, 2) |
| opMust(t, err) |
| - if total != 5 || len(page) != 2 || page[0].Address != "ed@example.net" { |
| + if total != 5 || len(page) != 2 || page[0].Address != "ed@notes.test" { |
| t.Fatalf("PeoplePage = %+v, %d", page, total) |
| } |
| page, total, err = s.PeoplePage("", 4, 2) |
| @@ -463,10 +463,10 @@ func TestNewestPeopleAndPeoplePage(t *testing.T) { |
| if total != 5 || len(page) != 1 || page[0].Address != "ann@example.com" { |
| t.Fatalf("PeoplePage offset 4 = %+v, %d", page, total) |
| } |
| - page, total, err = s.PeoplePage("n@exam", 0, 50) |
| + page, total, err = s.PeoplePage("exam", 0, 50) |
| opMust(t, err) |
| if total != 1 || len(page) != 1 || page[0].Address != "ann@example.com" { |
| - t.Fatalf("PeoplePage(n@exam) = %+v, %d", page, total) |
| + t.Fatalf("PeoplePage(exam) = %+v, %d", page, total) |
| } |
| } |