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

Merge branch 'main' of github.com:anyproto/any-sync into add-content-with-validator

# Conflicts:
#	commonspace/object/tree/synctree/synctree_test.go
This commit is contained in:
Sergey 2024-08-26 15:07:33 +02:00
commit f56a3f1a08
No known key found for this signature in database
GPG key ID: 3B6BEF79160221C6
53 changed files with 2026 additions and 464 deletions

View file

@ -1245,7 +1245,7 @@ func TestObjectTree(t *testing.T) {
}
deps.treeStorage.AddRawChangesSetHeads(rawChanges, []string{"6"})
hTree, err := buildHistoryTree(deps, HistoryTreeParams{
BeforeId: "6",
Heads: []string{"6"},
IncludeBeforeId: false,
})
require.NoError(t, err)
@ -1276,9 +1276,7 @@ func TestObjectTree(t *testing.T) {
changeCreator.CreateRaw("6", aclList.Head().Id, "5", false, "5"),
}
deps.treeStorage.AddRawChangesSetHeads(rawChanges, []string{"6"})
hTree, err := buildHistoryTree(deps, HistoryTreeParams{
BuildFullTree: true,
})
hTree, err := buildHistoryTree(deps, HistoryTreeParams{})
require.NoError(t, err)
// check tree heads
assert.Equal(t, []string{"6"}, hTree.Heads())
@ -1307,8 +1305,7 @@ func TestObjectTree(t *testing.T) {
}
deps.treeStorage.AddRawChangesSetHeads(rawChanges, []string{"6"})
hTree, err := buildHistoryTree(deps, HistoryTreeParams{
BeforeId: "6",
IncludeBeforeId: true,
Heads: []string{"6"}, IncludeBeforeId: true,
})
require.NoError(t, err)
// check tree heads
@ -1328,7 +1325,7 @@ func TestObjectTree(t *testing.T) {
t.Run("test history tree root", func(t *testing.T) {
_, deps := prepareHistoryTreeDeps(aclList)
hTree, err := buildHistoryTree(deps, HistoryTreeParams{
BeforeId: "0",
Heads: []string{"0"},
IncludeBeforeId: true,
})
require.NoError(t, err)