diff --git a/core/block/import/mock.go b/core/block/import/mock.go index d17fcaa33..86e483c8d 100644 --- a/core/block/import/mock.go +++ b/core/block/import/mock.go @@ -14,9 +14,10 @@ import ( time "time" treestorage "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" - converter "github.com/anyproto/anytype-heart/core/block/import/converter" types "github.com/gogo/protobuf/types" gomock "go.uber.org/mock/gomock" + + converter "github.com/anyproto/anytype-heart/core/block/import/converter" ) // MockCreator is a mock of Creator interface. diff --git a/core/block/restriction/fixture_test.go b/core/block/restriction/fixture_test.go index 9ed57ba44..aef988f0d 100644 --- a/core/block/restriction/fixture_test.go +++ b/core/block/restriction/fixture_test.go @@ -1,13 +1,13 @@ package restriction import ( + "context" "fmt" "testing" "github.com/anyproto/any-sync/app" "github.com/stretchr/testify/require" - "context" "github.com/anyproto/anytype-heart/core/domain" "github.com/anyproto/anytype-heart/core/system_object/mock_system_object" "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" diff --git a/core/block/restriction/object_test.go b/core/block/restriction/object_test.go index a95f74e9d..0f2ccb92c 100644 --- a/core/block/restriction/object_test.go +++ b/core/block/restriction/object_test.go @@ -3,10 +3,11 @@ package restriction import ( "testing" + "github.com/stretchr/testify/assert" + "github.com/anyproto/anytype-heart/pkg/lib/bundle" coresb "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - "github.com/stretchr/testify/assert" ) // TODO Use constructors instead for initializing restrictionHolder structures by hand. See givenObjectType and givenRelation diff --git a/core/filestorage/filesync/filestore_mock.go b/core/filestorage/filesync/filestore_mock.go index 61235181c..831d9dff1 100644 --- a/core/filestorage/filesync/filestore_mock.go +++ b/core/filestorage/filesync/filestore_mock.go @@ -13,10 +13,11 @@ import ( reflect "reflect" app "github.com/anyproto/any-sync/app" + gomock "go.uber.org/mock/gomock" + localstore "github.com/anyproto/anytype-heart/pkg/lib/localstore" filestore "github.com/anyproto/anytype-heart/pkg/lib/localstore/filestore" storage "github.com/anyproto/anytype-heart/pkg/lib/pb/storage" - gomock "go.uber.org/mock/gomock" ) // MockFileStore is a mock of FileStore interface. diff --git a/core/filestorage/rpcstore/mock_rpcstore/mock_rpcstore.go b/core/filestorage/rpcstore/mock_rpcstore/mock_rpcstore.go index 492224cd7..6240c53b0 100644 --- a/core/filestorage/rpcstore/mock_rpcstore/mock_rpcstore.go +++ b/core/filestorage/rpcstore/mock_rpcstore/mock_rpcstore.go @@ -14,10 +14,11 @@ import ( app "github.com/anyproto/any-sync/app" fileproto "github.com/anyproto/any-sync/commonfile/fileproto" - rpcstore "github.com/anyproto/anytype-heart/core/filestorage/rpcstore" blocks "github.com/ipfs/go-block-format" cid "github.com/ipfs/go-cid" gomock "go.uber.org/mock/gomock" + + rpcstore "github.com/anyproto/anytype-heart/core/filestorage/rpcstore" ) // MockService is a mock of Service interface. diff --git a/core/system_object/service_test.go b/core/system_object/service_test.go index f6abcc78c..5039f974d 100644 --- a/core/system_object/service_test.go +++ b/core/system_object/service_test.go @@ -1,15 +1,15 @@ package system_object import ( - "github.com/anyproto/anytype-heart/core/system_object/mock_system_object" + "context" "testing" "github.com/anyproto/any-sync/app" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "context" "github.com/anyproto/anytype-heart/core/domain" + "github.com/anyproto/anytype-heart/core/system_object/mock_system_object" "github.com/anyproto/anytype-heart/core/system_object/relationutils" "github.com/anyproto/anytype-heart/pkg/lib/bundle" "github.com/anyproto/anytype-heart/pkg/lib/core/mock_core" diff --git a/tests/testutil/util.go b/tests/testutil/util.go index bd5956294..0da2f9bbf 100644 --- a/tests/testutil/util.go +++ b/tests/testutil/util.go @@ -1,9 +1,9 @@ package testutil import ( + "context" "reflect" - "context" "github.com/anyproto/any-sync/app" mock2 "github.com/stretchr/testify/mock" ) diff --git a/util/testMock/anytype_mock.go b/util/testMock/anytype_mock.go index 9697e53e7..73fc4b391 100644 --- a/util/testMock/anytype_mock.go +++ b/util/testMock/anytype_mock.go @@ -13,10 +13,11 @@ import ( reflect "reflect" app "github.com/anyproto/any-sync/app" + gomock "go.uber.org/mock/gomock" + domain "github.com/anyproto/anytype-heart/core/domain" core "github.com/anyproto/anytype-heart/pkg/lib/core" threads "github.com/anyproto/anytype-heart/pkg/lib/threads" - gomock "go.uber.org/mock/gomock" ) // MockService is a mock of Service interface. diff --git a/util/testMock/file_service_mock.go b/util/testMock/file_service_mock.go index 79617da79..18fd6d708 100644 --- a/util/testMock/file_service_mock.go +++ b/util/testMock/file_service_mock.go @@ -14,13 +14,14 @@ import ( reflect "reflect" app "github.com/anyproto/any-sync/app" + types "github.com/gogo/protobuf/types" + gomock "go.uber.org/mock/gomock" + domain "github.com/anyproto/anytype-heart/core/domain" files "github.com/anyproto/anytype-heart/core/files" pb "github.com/anyproto/anytype-heart/pb" mill "github.com/anyproto/anytype-heart/pkg/lib/mill" storage "github.com/anyproto/anytype-heart/pkg/lib/pb/storage" - types "github.com/gogo/protobuf/types" - gomock "go.uber.org/mock/gomock" ) // MockFileService is a mock of Service interface. diff --git a/util/testMock/history_mock.go b/util/testMock/history_mock.go index d89e05210..7fed7aa57 100644 --- a/util/testMock/history_mock.go +++ b/util/testMock/history_mock.go @@ -11,8 +11,9 @@ package testMock import ( reflect "reflect" - undo "github.com/anyproto/anytype-heart/core/block/undo" gomock "go.uber.org/mock/gomock" + + undo "github.com/anyproto/anytype-heart/core/block/undo" ) // MockHistory is a mock of History interface. diff --git a/util/testMock/mockDetailsModifier/dm_mock.go b/util/testMock/mockDetailsModifier/dm_mock.go index f597b70cb..7886afce9 100644 --- a/util/testMock/mockDetailsModifier/dm_mock.go +++ b/util/testMock/mockDetailsModifier/dm_mock.go @@ -11,9 +11,10 @@ package mockDetailsModifier import ( reflect "reflect" - session "github.com/anyproto/anytype-heart/core/session" types "github.com/gogo/protobuf/types" gomock "go.uber.org/mock/gomock" + + session "github.com/anyproto/anytype-heart/core/session" ) // MockDetailsModifier is a mock of DetailsModifier interface. diff --git a/util/testMock/mockKanban/kanban_mock.go b/util/testMock/mockKanban/kanban_mock.go index 5d1c92ed9..b19f1b9fa 100644 --- a/util/testMock/mockKanban/kanban_mock.go +++ b/util/testMock/mockKanban/kanban_mock.go @@ -12,8 +12,9 @@ import ( reflect "reflect" app "github.com/anyproto/any-sync/app" - kanban "github.com/anyproto/anytype-heart/core/kanban" gomock "go.uber.org/mock/gomock" + + kanban "github.com/anyproto/anytype-heart/core/kanban" ) // MockService is a mock of Service interface. diff --git a/util/testMock/mockSource/source_mock.go b/util/testMock/mockSource/source_mock.go index 3d1fcad68..0f2ae028c 100644 --- a/util/testMock/mockSource/source_mock.go +++ b/util/testMock/mockSource/source_mock.go @@ -13,13 +13,14 @@ import ( reflect "reflect" app "github.com/anyproto/any-sync/app" + types "github.com/gogo/protobuf/types" + gomock "go.uber.org/mock/gomock" + state "github.com/anyproto/anytype-heart/core/block/editor/state" source "github.com/anyproto/anytype-heart/core/block/source" domain "github.com/anyproto/anytype-heart/core/domain" pb "github.com/anyproto/anytype-heart/pb" smartblock "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" - types "github.com/gogo/protobuf/types" - gomock "go.uber.org/mock/gomock" ) // MockService is a mock of Service interface. diff --git a/util/testMock/objectstore_mock.go b/util/testMock/objectstore_mock.go index 9b530dd83..650bbbcff 100644 --- a/util/testMock/objectstore_mock.go +++ b/util/testMock/objectstore_mock.go @@ -14,12 +14,13 @@ import ( app "github.com/anyproto/any-sync/app" coordinatorproto "github.com/anyproto/any-sync/coordinator/coordinatorproto" + types "github.com/gogo/protobuf/types" + gomock "go.uber.org/mock/gomock" + smartblock "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" database "github.com/anyproto/anytype-heart/pkg/lib/database" ftsearch "github.com/anyproto/anytype-heart/pkg/lib/localstore/ftsearch" model "github.com/anyproto/anytype-heart/pkg/lib/pb/model" - types "github.com/gogo/protobuf/types" - gomock "go.uber.org/mock/gomock" ) // MockObjectStore is a mock of ObjectStore interface. diff --git a/util/testMock/sbt_provider_mock.go b/util/testMock/sbt_provider_mock.go index d4eb0fd47..b88d03542 100644 --- a/util/testMock/sbt_provider_mock.go +++ b/util/testMock/sbt_provider_mock.go @@ -12,8 +12,9 @@ import ( reflect "reflect" app "github.com/anyproto/any-sync/app" - smartblock "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" gomock "go.uber.org/mock/gomock" + + smartblock "github.com/anyproto/anytype-heart/pkg/lib/core/smartblock" ) // MockSmartBlockTypeProvider is a mock of SmartBlockTypeProvider interface.