state: store join util
All checks were successful
Tests / Go tests (push) Successful in 39s
Nix / NixOS tests (push) Successful in 3m5s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2024-12-20 19:05:39 +09:00
parent 195b717e01
commit ed10574dea
2 changed files with 57 additions and 0 deletions

View File

@@ -94,6 +94,14 @@ func testStore(t *testing.T, s state.Store) {
}
})
t.Run("join store", func(t *testing.T) {
if entries, err := state.Join(s); err != nil {
t.Fatalf("Join: error = %v", err)
} else if len(entries) != 3 {
t.Fatalf("Join(s) = %#v", entries)
}
})
t.Run("clear aid 1", func(t *testing.T) {
do(1, func(c state.Cursor) {
if err := c.Destroy(tc[insertEntryOtherApp].ID); err != nil {