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

AddContent correct encryption and tests

This commit is contained in:
mcrakhman 2024-02-01 16:37:11 +01:00
parent adac306d86
commit 141ab46e38
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
2 changed files with 11 additions and 1 deletions

View file

@ -102,7 +102,7 @@ func TestObjectTree(t *testing.T) {
aclList, keys := prepareAclList(t)
ctx := context.Background()
t.Run("validate no read key", func(t *testing.T) {
t.Run("user delete logic: validation, key change, decryption", func(t *testing.T) {
exec := list.NewAclExecutor("spaceId")
type cmdErr struct {
cmd string
@ -168,6 +168,12 @@ func TestObjectTree(t *testing.T) {
Heads: heads,
}, BuildKeyVerifiableObjectTree, bAccount.Acl)
require.Equal(t, ErrHasInvalidChanges, err)
err = aTree.IterateRoot(func(change *Change, decrypted []byte) (any, error) {
return nil, nil
}, func(change *Change) bool {
return true
})
require.NoError(t, err)
})
t.Run("add content", func(t *testing.T) {