mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Fix all old object tree tests
This commit is contained in:
parent
296cf7144a
commit
3c6284c750
4 changed files with 15 additions and 8 deletions
|
@ -229,8 +229,9 @@ func prepareAclList(t *testing.T) (list.AclList, *accountdata.AccountKeys) {
|
|||
}
|
||||
|
||||
func prepareHistoryTreeDeps(t *testing.T, aclList list.AclList) (*MockChangeCreator, objectTreeDeps) {
|
||||
store := newStore(ctx, t)
|
||||
changeCreator := NewMockChangeCreator(store)
|
||||
changeCreator := NewMockChangeCreator(func() anystore.DB {
|
||||
return newStore(ctx, t)
|
||||
})
|
||||
treeStorage := changeCreator.CreateNewTreeStorage(t, "0", aclList.Head().Id, false)
|
||||
root, _ := treeStorage.Root(ctx)
|
||||
changeBuilder := &nonVerifiableChangeBuilder{
|
||||
|
@ -256,8 +257,9 @@ func prepareContext(
|
|||
objTreeBuilder BuildObjectTreeFunc,
|
||||
isDerived bool,
|
||||
additionalChanges func(changeCreator *MockChangeCreator) RawChangesPayload) testTreeContext {
|
||||
store := newStore(ctx, t)
|
||||
changeCreator := NewMockChangeCreator(store)
|
||||
changeCreator := NewMockChangeCreator(func() anystore.DB {
|
||||
return newStore(ctx, t)
|
||||
})
|
||||
treeStorage := changeCreator.CreateNewTreeStorage(t, "0", aclList.Head().Id, isDerived)
|
||||
objTree, err := objTreeBuilder(treeStorage, aclList)
|
||||
require.NoError(t, err, "building tree should be without error")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue