mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Change objecttree to set mode Rebuild if we update the snapshot after current heads
This commit is contained in:
parent
11d50d087a
commit
7a57d7b0c4
2 changed files with 14 additions and 2 deletions
|
@ -270,7 +270,8 @@ func TestObjectTree(t *testing.T) {
|
|||
assert.Equal(t, []string{"0"}, res.OldHeads)
|
||||
assert.Equal(t, []string{"4"}, res.Heads)
|
||||
assert.Equal(t, len(rawChanges), len(res.Added))
|
||||
assert.Equal(t, Append, res.Mode)
|
||||
// here we have rebuild, because we reduced tree to new snapshot
|
||||
assert.Equal(t, Rebuild, res.Mode)
|
||||
|
||||
// check tree heads
|
||||
assert.Equal(t, []string{"4"}, objTree.Heads())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue