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

Fix snapshot path, update mocks, ignore heads mismatch error

This commit is contained in:
Mikhail Rakhmanov 2025-03-11 16:20:44 +01:00
parent b88e9e34fa
commit 0cac23037c
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
48 changed files with 87 additions and 106 deletions

View file

@ -1075,7 +1075,8 @@ func TestObjectTree(t *testing.T) {
_, err := objTree.AddRawChanges(context.Background(), payload)
require.NoError(t, err, "adding changes should be without error")
snapshotPath := objTree.SnapshotPath()
snapshotPath, err := objTree.SnapshotPath()
require.NoError(t, err)
assert.Equal(t, []string{"3", "0"}, snapshotPath)
assert.Equal(t, true, objTree.(*objectTree).snapshotPathIsActual())
@ -1857,7 +1858,9 @@ func TestObjectTree(t *testing.T) {
RawChanges: result.changes,
})
require.NoError(t, err)
iter, err := objTree.ChangesAfterCommonSnapshotLoader(otherTree.SnapshotPath(), otherTree.Heads())
snPath, err := otherTree.SnapshotPath()
require.NoError(t, err)
iter, err := objTree.ChangesAfterCommonSnapshotLoader(snPath, otherTree.Heads())
require.NoError(t, err)
for {
batch, err := iter.NextBatch(400)