1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

Fix validator tests

This commit is contained in:
mcrakhman 2024-11-25 16:10:23 +01:00
parent 014412646e
commit 825878ae4d
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
3 changed files with 14 additions and 3 deletions

View file

@ -669,7 +669,9 @@ func TestObjectTree(t *testing.T) {
}
slices.SortFunc(chs, sortFunc)
slices.SortFunc(rawChs, sortFunc)
require.Equal(t, chs, rawChs)
for i, ch := range chs {
require.Equal(t, ch.Id, rawChs[i].Id)
}
})
t.Run("derived more than 1 change, snapshot, correct", func(t *testing.T) {
@ -713,7 +715,9 @@ func TestObjectTree(t *testing.T) {
}
slices.SortFunc(chs, sortFunc)
slices.SortFunc(rawChs, sortFunc)
require.Equal(t, chs, rawChs)
for i, ch := range chs {
require.Equal(t, ch.Id, rawChs[i].Id)
}
})
t.Run("validate from start, multiple snapshots, correct", func(t *testing.T) {