From 897b4900c260a9f961846cc4cb47e88ad0e72b61 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Fri, 30 Sep 2022 14:43:11 +0200 Subject: [PATCH] Require no error in tests --- common/commonspace/diffservice/diffsyncer_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/commonspace/diffservice/diffsyncer_test.go b/common/commonspace/diffservice/diffsyncer_test.go index 64d0abfd..70a849d0 100644 --- a/common/commonspace/diffservice/diffsyncer_test.go +++ b/common/commonspace/diffservice/diffsyncer_test.go @@ -13,6 +13,7 @@ import ( storage2 "github.com/anytypeio/go-anytype-infrastructure-experiments/pkg/acl/storage" "github.com/anytypeio/go-anytype-infrastructure-experiments/pkg/ldiff" "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" "storj.io/drpc" "testing" ) @@ -77,7 +78,7 @@ func TestDiffSyncer_Sync(t *testing.T) { GetTree(gomock.Any(), spaceId, arg). Return(cache.TreeResult{}, nil) } - _ = diffSyncer.Sync(ctx) + require.NoError(t, diffSyncer.Sync(ctx)) }) 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)). Return(nil, nil) - _ = diffSyncer.Sync(ctx) + require.NoError(t, diffSyncer.Sync(ctx)) }) }