From d1ed1d2bf9f196a05b24a84a5276390b1e105ba5 Mon Sep 17 00:00:00 2001 From: santoshkumarradha Date: Mon, 2 Nov 2026 05:11:27 -0500 Subject: [PATCH 1/2] tests: damage the teams store, not a teams.json, before continuing a chat #2066 moved teams into an SQLite store. TestContinuingAChatKeepsItsLease- DespiteDamagedTeamsAndLaterHeals still damaged teams by overwriting the bytes at teams.Path and later wrote them back, which no longer breaks the store, so the take never met a failed rebind and never said so. It now uses teamstest.Break and its restore, as the other teams tests did in #2099. --- internal/syncsetup/teams_test.go | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/internal/syncsetup/teams_test.go b/internal/syncsetup/teams_test.go index 989cb41177..51914c0f4b 100644 --- a/internal/syncsetup/teams_test.go +++ b/internal/syncsetup/teams_test.go @@ -407,13 +407,8 @@ func TestContinuingAChatKeepsItsLeaseDespiteDamagedTeamsAndLaterHeals(t *testing if err := h.b.SyncState(ctx); err != nil { t.Fatal(err) } - good, err := os.ReadFile(teams.Path(h.b.Home)) - if err != nil { - t.Fatal(err) - } - if err := os.WriteFile(teams.Path(h.b.Home), []byte("damaged"), 0600); err != nil { - t.Fatal(err) - } + // app/v3 keeps teams in an SQLite store (#2066): damage the store itself. + restore := teamstest.Break(t, h.b.Home, []byte("damaged")) h.lapse() took, err := h.continuerB().Take(ctx, h.cell.ID) if err != nil { @@ -430,9 +425,7 @@ func TestContinuingAChatKeepsItsLeaseDespiteDamagedTeamsAndLaterHeals(t *testing if err != nil || string(received) != string(cursor) { t.Fatal("cursor fixture did not travel", string(received), err) } - if err := os.WriteFile(teams.Path(h.b.Home), good, 0600); err != nil { - t.Fatal(err) - } + restore() if err := h.b.SyncState(ctx); err != nil { t.Fatal(err) } From 28bad3059baa1d43ac229ea457b164faf102609d Mon Sep 17 00:00:00 2001 From: santoshkumarradha Date: Mon, 2 Nov 2026 05:12:33 -0500 Subject: [PATCH 2/2] docs: change entry for this pull request --- docs/changes/unreleased/2182-teams-store-test.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 docs/changes/unreleased/2182-teams-store-test.md diff --git a/docs/changes/unreleased/2182-teams-store-test.md b/docs/changes/unreleased/2182-teams-store-test.md new file mode 100644 index 0000000000..5123ecb99f --- /dev/null +++ b/docs/changes/unreleased/2182-teams-store-test.md @@ -0,0 +1,6 @@ +--- +kind: internal +title: The damaged-teams continuation test damages the SQLite teams store +pr: 2182 +surface: [chat] +---