Require no error in tests

This commit is contained in:
mcrakhman 2022-09-30 14:43:11 +02:00 committed by Mikhail Iudin
parent 93674aeabc
commit 897b4900c2
No known key found for this signature in database
GPG Key ID: FAAAA8BAABDFF1C0

View File

@ -13,6 +13,7 @@ import (
storage2 "github.com/anytypeio/go-anytype-infrastructure-experiments/pkg/acl/storage" storage2 "github.com/anytypeio/go-anytype-infrastructure-experiments/pkg/acl/storage"
"github.com/anytypeio/go-anytype-infrastructure-experiments/pkg/ldiff" "github.com/anytypeio/go-anytype-infrastructure-experiments/pkg/ldiff"
"github.com/golang/mock/gomock" "github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"storj.io/drpc" "storj.io/drpc"
"testing" "testing"
) )
@ -77,7 +78,7 @@ func TestDiffSyncer_Sync(t *testing.T) {
GetTree(gomock.Any(), spaceId, arg). GetTree(gomock.Any(), spaceId, arg).
Return(cache.TreeResult{}, nil) Return(cache.TreeResult{}, nil)
} }
_ = diffSyncer.Sync(ctx) require.NoError(t, diffSyncer.Sync(ctx))
}) })
t.Run("diff syncer sync space missing", func(t *testing.T) { t.Run("diff syncer sync space missing", func(t *testing.T) {
@ -104,6 +105,6 @@ func TestDiffSyncer_Sync(t *testing.T) {
PushSpace(gomock.Any(), newPushSpaceRequestMatcher(spaceId, aclRoot, spaceHeader)). PushSpace(gomock.Any(), newPushSpaceRequestMatcher(spaceId, aclRoot, spaceHeader)).
Return(nil, nil) Return(nil, nil)
_ = diffSyncer.Sync(ctx) require.NoError(t, diffSyncer.Sync(ctx))
}) })
} }