diff --git a/accountservice/mock_accountservice/helper.go b/accountservice/mock_accountservice/helper.go index cec6f34b..2dbe031e 100644 --- a/accountservice/mock_accountservice/helper.go +++ b/accountservice/mock_accountservice/helper.go @@ -3,7 +3,7 @@ package mock_accountservice import ( "github.com/anyproto/any-sync/accountservice" "github.com/anyproto/any-sync/commonspace/object/accountdata" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" ) func NewAccountServiceWithAccount(ctrl *gomock.Controller, acc *accountdata.AccountKeys) *MockService { diff --git a/accountservice/mock_accountservice/mock_accountservice.go b/accountservice/mock_accountservice/mock_accountservice.go index a9bbff7f..7da43f91 100644 --- a/accountservice/mock_accountservice/mock_accountservice.go +++ b/accountservice/mock_accountservice/mock_accountservice.go @@ -9,7 +9,7 @@ import ( app "github.com/anyproto/any-sync/app" accountdata "github.com/anyproto/any-sync/commonspace/object/accountdata" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockService is a mock of Service interface. diff --git a/app/ldiff/mock_ldiff/mock_ldiff.go b/app/ldiff/mock_ldiff/mock_ldiff.go index 20a522b7..8e09ade9 100644 --- a/app/ldiff/mock_ldiff/mock_ldiff.go +++ b/app/ldiff/mock_ldiff/mock_ldiff.go @@ -9,7 +9,7 @@ import ( reflect "reflect" ldiff "github.com/anyproto/any-sync/app/ldiff" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockDiff is a mock of Diff interface. diff --git a/commonspace/credentialprovider/mock_credentialprovider/mock_credentialprovider.go b/commonspace/credentialprovider/mock_credentialprovider/mock_credentialprovider.go index 77faf28e..18090381 100644 --- a/commonspace/credentialprovider/mock_credentialprovider/mock_credentialprovider.go +++ b/commonspace/credentialprovider/mock_credentialprovider/mock_credentialprovider.go @@ -10,7 +10,7 @@ import ( app "github.com/anyproto/any-sync/app" spacesyncproto "github.com/anyproto/any-sync/commonspace/spacesyncproto" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockCredentialProvider is a mock of CredentialProvider interface. diff --git a/commonspace/deletionstate/deletionstate_test.go b/commonspace/deletionstate/deletionstate_test.go index e5489bd8..2050fc37 100644 --- a/commonspace/deletionstate/deletionstate_test.go +++ b/commonspace/deletionstate/deletionstate_test.go @@ -3,8 +3,8 @@ package deletionstate import ( "github.com/anyproto/any-sync/commonspace/spacestorage" "github.com/anyproto/any-sync/commonspace/spacestorage/mock_spacestorage" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "sort" "testing" ) diff --git a/commonspace/deletionstate/mock_deletionstate/mock_deletionstate.go b/commonspace/deletionstate/mock_deletionstate/mock_deletionstate.go index c4e9fefb..7706b004 100644 --- a/commonspace/deletionstate/mock_deletionstate/mock_deletionstate.go +++ b/commonspace/deletionstate/mock_deletionstate/mock_deletionstate.go @@ -9,7 +9,7 @@ import ( app "github.com/anyproto/any-sync/app" deletionstate "github.com/anyproto/any-sync/commonspace/deletionstate" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockObjectDeletionState is a mock of ObjectDeletionState interface. diff --git a/commonspace/headsync/diffsyncer_test.go b/commonspace/headsync/diffsyncer_test.go index 7cdb870a..dd21d27c 100644 --- a/commonspace/headsync/diffsyncer_test.go +++ b/commonspace/headsync/diffsyncer_test.go @@ -11,8 +11,8 @@ import ( "github.com/anyproto/any-sync/commonspace/object/tree/treestorage/mock_treestorage" "github.com/anyproto/any-sync/commonspace/spacesyncproto" "github.com/anyproto/any-sync/net/peer" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "storj.io/drpc" "testing" "time" diff --git a/commonspace/headsync/headsync_test.go b/commonspace/headsync/headsync_test.go index 4f14d084..54cdd96a 100644 --- a/commonspace/headsync/headsync_test.go +++ b/commonspace/headsync/headsync_test.go @@ -23,8 +23,8 @@ import ( "github.com/anyproto/any-sync/commonspace/syncstatus" "github.com/anyproto/any-sync/nodeconf" "github.com/anyproto/any-sync/nodeconf/mock_nodeconf" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "sync/atomic" "testing" ) diff --git a/commonspace/headsync/mock_headsync/mock_headsync.go b/commonspace/headsync/mock_headsync/mock_headsync.go index 46b16aab..b569fde4 100644 --- a/commonspace/headsync/mock_headsync/mock_headsync.go +++ b/commonspace/headsync/mock_headsync/mock_headsync.go @@ -8,7 +8,7 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockDiffSyncer is a mock of DiffSyncer interface. diff --git a/commonspace/object/acl/list/mock_list/mock_list.go b/commonspace/object/acl/list/mock_list/mock_list.go index b81f0f80..bf86b80d 100644 --- a/commonspace/object/acl/list/mock_list/mock_list.go +++ b/commonspace/object/acl/list/mock_list/mock_list.go @@ -10,7 +10,7 @@ import ( aclrecordproto "github.com/anyproto/any-sync/commonspace/object/acl/aclrecordproto" list "github.com/anyproto/any-sync/commonspace/object/acl/list" crypto "github.com/anyproto/any-sync/util/crypto" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockAclList is a mock of AclList interface. diff --git a/commonspace/object/acl/liststorage/mock_liststorage/mock_liststorage.go b/commonspace/object/acl/liststorage/mock_liststorage/mock_liststorage.go index ce0a8bbf..da5b1bd3 100644 --- a/commonspace/object/acl/liststorage/mock_liststorage/mock_liststorage.go +++ b/commonspace/object/acl/liststorage/mock_liststorage/mock_liststorage.go @@ -9,7 +9,7 @@ import ( reflect "reflect" aclrecordproto "github.com/anyproto/any-sync/commonspace/object/acl/aclrecordproto" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockListStorage is a mock of ListStorage interface. diff --git a/commonspace/object/tree/objecttree/mock_objecttree/mock_objecttree.go b/commonspace/object/tree/objecttree/mock_objecttree/mock_objecttree.go index 1f0897a5..3e349e9d 100644 --- a/commonspace/object/tree/objecttree/mock_objecttree/mock_objecttree.go +++ b/commonspace/object/tree/objecttree/mock_objecttree/mock_objecttree.go @@ -13,7 +13,7 @@ import ( objecttree "github.com/anyproto/any-sync/commonspace/object/tree/objecttree" treechangeproto "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" treestorage "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockObjectTree is a mock of ObjectTree interface. diff --git a/commonspace/object/tree/synctree/mock_synctree/mock_synctree.go b/commonspace/object/tree/synctree/mock_synctree/mock_synctree.go index 792dbee7..3a5984ac 100644 --- a/commonspace/object/tree/synctree/mock_synctree/mock_synctree.go +++ b/commonspace/object/tree/synctree/mock_synctree/mock_synctree.go @@ -15,7 +15,7 @@ import ( treechangeproto "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" treestorage "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" spacesyncproto "github.com/anyproto/any-sync/commonspace/spacesyncproto" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockSyncTree is a mock of SyncTree interface. diff --git a/commonspace/object/tree/synctree/synctree_test.go b/commonspace/object/tree/synctree/synctree_test.go index 76791c59..3bba33b3 100644 --- a/commonspace/object/tree/synctree/synctree_test.go +++ b/commonspace/object/tree/synctree/synctree_test.go @@ -11,8 +11,8 @@ import ( "github.com/anyproto/any-sync/commonspace/objectsync" "github.com/anyproto/any-sync/commonspace/syncstatus" "github.com/anyproto/any-sync/nodeconf" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "testing" ) diff --git a/commonspace/object/tree/synctree/synctreehandler_test.go b/commonspace/object/tree/synctree/synctreehandler_test.go index 84f3b237..320ff56f 100644 --- a/commonspace/object/tree/synctree/synctreehandler_test.go +++ b/commonspace/object/tree/synctree/synctreehandler_test.go @@ -9,8 +9,8 @@ import ( "github.com/anyproto/any-sync/commonspace/object/tree/synctree/mock_synctree" "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" "github.com/anyproto/any-sync/commonspace/syncstatus" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" ) type testObjTreeMock struct { diff --git a/commonspace/object/tree/synctree/treeremotegetter_test.go b/commonspace/object/tree/synctree/treeremotegetter_test.go index 60452b1a..a191b678 100644 --- a/commonspace/object/tree/synctree/treeremotegetter_test.go +++ b/commonspace/object/tree/synctree/treeremotegetter_test.go @@ -12,8 +12,8 @@ import ( "github.com/anyproto/any-sync/net/peer" "github.com/anyproto/any-sync/net/peer/mock_peer" "github.com/gogo/protobuf/proto" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" ) type treeRemoteGetterFixture struct { diff --git a/commonspace/object/tree/synctree/treesyncprotocol_test.go b/commonspace/object/tree/synctree/treesyncprotocol_test.go index c80dbe35..a88dd168 100644 --- a/commonspace/object/tree/synctree/treesyncprotocol_test.go +++ b/commonspace/object/tree/synctree/treesyncprotocol_test.go @@ -8,8 +8,8 @@ import ( "github.com/anyproto/any-sync/commonspace/object/tree/objecttree/mock_objecttree" "github.com/anyproto/any-sync/commonspace/object/tree/synctree/mock_synctree" "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "testing" ) diff --git a/commonspace/object/tree/synctree/updatelistener/mock_updatelistener/mock_updatelistener.go b/commonspace/object/tree/synctree/updatelistener/mock_updatelistener/mock_updatelistener.go index 794b9381..050f458e 100644 --- a/commonspace/object/tree/synctree/updatelistener/mock_updatelistener/mock_updatelistener.go +++ b/commonspace/object/tree/synctree/updatelistener/mock_updatelistener/mock_updatelistener.go @@ -8,7 +8,7 @@ import ( reflect "reflect" objecttree "github.com/anyproto/any-sync/commonspace/object/tree/objecttree" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockUpdateListener is a mock of UpdateListener interface. diff --git a/commonspace/object/tree/treestorage/mock_treestorage/mock_treestorage.go b/commonspace/object/tree/treestorage/mock_treestorage/mock_treestorage.go index 2db9a949..3a20051d 100644 --- a/commonspace/object/tree/treestorage/mock_treestorage/mock_treestorage.go +++ b/commonspace/object/tree/treestorage/mock_treestorage/mock_treestorage.go @@ -9,7 +9,7 @@ import ( reflect "reflect" treechangeproto "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockTreeStorage is a mock of TreeStorage interface. diff --git a/commonspace/object/treemanager/mock_treemanager/mock_treemanager.go b/commonspace/object/treemanager/mock_treemanager/mock_treemanager.go index ee285aac..3ef2892f 100644 --- a/commonspace/object/treemanager/mock_treemanager/mock_treemanager.go +++ b/commonspace/object/treemanager/mock_treemanager/mock_treemanager.go @@ -11,7 +11,7 @@ import ( app "github.com/anyproto/any-sync/app" objecttree "github.com/anyproto/any-sync/commonspace/object/tree/objecttree" treemanager "github.com/anyproto/any-sync/commonspace/object/treemanager" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockTreeManager is a mock of TreeManager interface. diff --git a/commonspace/objectsync/mock_objectsync/mock_objectsync.go b/commonspace/objectsync/mock_objectsync/mock_objectsync.go index 2858c6f9..d1c4666d 100644 --- a/commonspace/objectsync/mock_objectsync/mock_objectsync.go +++ b/commonspace/objectsync/mock_objectsync/mock_objectsync.go @@ -12,7 +12,7 @@ import ( app "github.com/anyproto/any-sync/app" objectsync "github.com/anyproto/any-sync/commonspace/objectsync" spacesyncproto "github.com/anyproto/any-sync/commonspace/spacesyncproto" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockObjectSync is a mock of ObjectSync interface. diff --git a/commonspace/objecttreebuilder/mock_objecttreebuilder/mock_objecttreebuilder.go b/commonspace/objecttreebuilder/mock_objecttreebuilder/mock_objecttreebuilder.go index d7cca965..b44d028f 100644 --- a/commonspace/objecttreebuilder/mock_objecttreebuilder/mock_objecttreebuilder.go +++ b/commonspace/objecttreebuilder/mock_objecttreebuilder/mock_objecttreebuilder.go @@ -12,7 +12,7 @@ import ( updatelistener "github.com/anyproto/any-sync/commonspace/object/tree/synctree/updatelistener" treestorage "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" objecttreebuilder "github.com/anyproto/any-sync/commonspace/objecttreebuilder" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockTreeBuilder is a mock of TreeBuilder interface. diff --git a/commonspace/peermanager/mock_peermanager/mock_peermanager.go b/commonspace/peermanager/mock_peermanager/mock_peermanager.go index 210fb319..d7d99e32 100644 --- a/commonspace/peermanager/mock_peermanager/mock_peermanager.go +++ b/commonspace/peermanager/mock_peermanager/mock_peermanager.go @@ -11,7 +11,7 @@ import ( app "github.com/anyproto/any-sync/app" spacesyncproto "github.com/anyproto/any-sync/commonspace/spacesyncproto" peer "github.com/anyproto/any-sync/net/peer" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockPeerManager is a mock of PeerManager interface. diff --git a/commonspace/requestmanager/requestmanager_test.go b/commonspace/requestmanager/requestmanager_test.go index 35d497fc..2135a41b 100644 --- a/commonspace/requestmanager/requestmanager_test.go +++ b/commonspace/requestmanager/requestmanager_test.go @@ -9,8 +9,8 @@ import ( "github.com/anyproto/any-sync/net/peer" "github.com/anyproto/any-sync/net/peer/mock_peer" "github.com/anyproto/any-sync/net/pool/mock_pool" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "storj.io/drpc" "storj.io/drpc/drpcconn" "sync" diff --git a/commonspace/settings/deleter_test.go b/commonspace/settings/deleter_test.go index e4a32e84..c057207a 100644 --- a/commonspace/settings/deleter_test.go +++ b/commonspace/settings/deleter_test.go @@ -6,7 +6,7 @@ import ( "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" "github.com/anyproto/any-sync/commonspace/object/treemanager/mock_treemanager" "github.com/anyproto/any-sync/commonspace/spacestorage/mock_spacestorage" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "testing" ) diff --git a/commonspace/settings/deletionmanager_test.go b/commonspace/settings/deletionmanager_test.go index 69e8830d..fb1e7355 100644 --- a/commonspace/settings/deletionmanager_test.go +++ b/commonspace/settings/deletionmanager_test.go @@ -6,8 +6,8 @@ import ( "github.com/anyproto/any-sync/commonspace/object/treemanager/mock_treemanager" "github.com/anyproto/any-sync/commonspace/settings/mock_settings" "github.com/anyproto/any-sync/commonspace/settings/settingsstate" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "testing" ) diff --git a/commonspace/settings/mock_settings/mock_settings.go b/commonspace/settings/mock_settings/mock_settings.go index 69598251..2d5da99f 100644 --- a/commonspace/settings/mock_settings/mock_settings.go +++ b/commonspace/settings/mock_settings/mock_settings.go @@ -9,7 +9,7 @@ import ( reflect "reflect" settingsstate "github.com/anyproto/any-sync/commonspace/settings/settingsstate" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockDeletionManager is a mock of DeletionManager interface. diff --git a/commonspace/settings/settingsobject_test.go b/commonspace/settings/settingsobject_test.go index 9d83d9cd..7d2f4eaa 100644 --- a/commonspace/settings/settingsobject_test.go +++ b/commonspace/settings/settingsobject_test.go @@ -16,8 +16,8 @@ import ( "github.com/anyproto/any-sync/commonspace/settings/settingsstate" "github.com/anyproto/any-sync/commonspace/settings/settingsstate/mock_settingsstate" "github.com/anyproto/any-sync/commonspace/spacestorage/mock_spacestorage" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "sync" "testing" "time" diff --git a/commonspace/settings/settingsstate/mock_settingsstate/mock_settingsstate.go b/commonspace/settings/settingsstate/mock_settingsstate/mock_settingsstate.go index 2bb898cf..091c3ea8 100644 --- a/commonspace/settings/settingsstate/mock_settingsstate/mock_settingsstate.go +++ b/commonspace/settings/settingsstate/mock_settingsstate/mock_settingsstate.go @@ -9,7 +9,7 @@ import ( objecttree "github.com/anyproto/any-sync/commonspace/object/tree/objecttree" settingsstate "github.com/anyproto/any-sync/commonspace/settings/settingsstate" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockStateBuilder is a mock of StateBuilder interface. diff --git a/commonspace/settings/settingsstate/statebuilder_test.go b/commonspace/settings/settingsstate/statebuilder_test.go index a2cf3072..c2d1d4ed 100644 --- a/commonspace/settings/settingsstate/statebuilder_test.go +++ b/commonspace/settings/settingsstate/statebuilder_test.go @@ -4,8 +4,8 @@ import ( "github.com/anyproto/any-sync/commonspace/object/tree/objecttree" "github.com/anyproto/any-sync/commonspace/object/tree/objecttree/mock_objecttree" "github.com/anyproto/any-sync/commonspace/spacesyncproto" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "testing" ) diff --git a/commonspace/spacestorage/mock_spacestorage/mock_spacestorage.go b/commonspace/spacestorage/mock_spacestorage/mock_spacestorage.go index bc7f448c..a81d0a93 100644 --- a/commonspace/spacestorage/mock_spacestorage/mock_spacestorage.go +++ b/commonspace/spacestorage/mock_spacestorage/mock_spacestorage.go @@ -13,7 +13,7 @@ import ( treechangeproto "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" treestorage "github.com/anyproto/any-sync/commonspace/object/tree/treestorage" spacesyncproto "github.com/anyproto/any-sync/commonspace/spacesyncproto" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockSpaceStorage is a mock of SpaceStorage interface. diff --git a/commonspace/spacesyncproto/mock_spacesyncproto/mock_spacesyncproto.go b/commonspace/spacesyncproto/mock_spacesyncproto/mock_spacesyncproto.go index 8d8a1111..a04f5e11 100644 --- a/commonspace/spacesyncproto/mock_spacesyncproto/mock_spacesyncproto.go +++ b/commonspace/spacesyncproto/mock_spacesyncproto/mock_spacesyncproto.go @@ -9,7 +9,7 @@ import ( reflect "reflect" spacesyncproto "github.com/anyproto/any-sync/commonspace/spacesyncproto" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" drpc "storj.io/drpc" ) diff --git a/consensus/consensusclient/client_test.go b/consensus/consensusclient/client_test.go index 563ef110..ea47c50a 100644 --- a/consensus/consensusclient/client_test.go +++ b/consensus/consensusclient/client_test.go @@ -12,9 +12,9 @@ import ( "github.com/anyproto/any-sync/nodeconf/mock_nodeconf" "github.com/anyproto/any-sync/testutil/accounttest" "github.com/anyproto/any-sync/util/cidutil" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "sync" "testing" "time" diff --git a/consensus/consensusclient/mock_consensusclient/mock_consensusclient.go b/consensus/consensusclient/mock_consensusclient/mock_consensusclient.go index 95087515..242bd645 100644 --- a/consensus/consensusclient/mock_consensusclient/mock_consensusclient.go +++ b/consensus/consensusclient/mock_consensusclient/mock_consensusclient.go @@ -11,7 +11,7 @@ import ( app "github.com/anyproto/any-sync/app" consensusclient "github.com/anyproto/any-sync/consensus/consensusclient" consensusproto "github.com/anyproto/any-sync/consensus/consensusproto" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockService is a mock of Service interface. @@ -38,7 +38,7 @@ func (m *MockService) EXPECT() *MockServiceMockRecorder { } // AddLog mocks base method. -func (m *MockService) AddLog(arg0 context.Context, arg1 *consensusproto.Log) error { +func (m *MockService) AddLog(arg0 context.Context, arg1 *consensusproto.RawRecordWithId) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AddLog", arg0, arg1) ret0, _ := ret[0].(error) @@ -52,7 +52,7 @@ func (mr *MockServiceMockRecorder) AddLog(arg0, arg1 interface{}) *gomock.Call { } // AddRecord mocks base method. -func (m *MockService) AddRecord(arg0 context.Context, arg1 []byte, arg2 *consensusproto.RawRecord) (*consensusproto.RawRecordWithId, error) { +func (m *MockService) AddRecord(arg0 context.Context, arg1 string, arg2 *consensusproto.RawRecord) (*consensusproto.RawRecordWithId, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AddRecord", arg0, arg1, arg2) ret0, _ := ret[0].(*consensusproto.RawRecordWithId) @@ -123,7 +123,7 @@ func (mr *MockServiceMockRecorder) Run(arg0 interface{}) *gomock.Call { } // UnWatch mocks base method. -func (m *MockService) UnWatch(arg0 []byte) error { +func (m *MockService) UnWatch(arg0 string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UnWatch", arg0) ret0, _ := ret[0].(error) @@ -137,7 +137,7 @@ func (mr *MockServiceMockRecorder) UnWatch(arg0 interface{}) *gomock.Call { } // Watch mocks base method. -func (m *MockService) Watch(arg0 []byte, arg1 consensusclient.Watcher) error { +func (m *MockService) Watch(arg0 string, arg1 consensusclient.Watcher) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Watch", arg0, arg1) ret0, _ := ret[0].(error) diff --git a/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go b/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go index d2d83159..c94189e9 100644 --- a/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go +++ b/coordinator/coordinatorclient/mock_coordinatorclient/mock_coordinatorclient.go @@ -12,7 +12,7 @@ import ( treechangeproto "github.com/anyproto/any-sync/commonspace/object/tree/treechangeproto" coordinatorclient "github.com/anyproto/any-sync/coordinator/coordinatorclient" coordinatorproto "github.com/anyproto/any-sync/coordinator/coordinatorproto" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockCoordinatorClient is a mock of CoordinatorClient interface. diff --git a/go.mod b/go.mod index 925e5cd6..2a10036c 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,6 @@ require ( github.com/gobwas/glob v0.2.3 github.com/goccy/go-graphviz v0.1.1 github.com/gogo/protobuf v1.3.2 - github.com/golang/mock v1.6.0 github.com/google/uuid v1.3.0 github.com/hashicorp/yamux v0.1.1 github.com/huandu/skiplist v1.2.0 @@ -34,6 +33,7 @@ require ( github.com/tyler-smith/go-bip39 v1.1.0 github.com/zeebo/blake3 v0.2.3 go.uber.org/atomic v1.11.0 + go.uber.org/mock v0.2.0 go.uber.org/zap v1.24.0 golang.org/x/crypto v0.10.0 golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 diff --git a/go.sum b/go.sum index e36885d7..8afce3ca 100644 --- a/go.sum +++ b/go.sum @@ -54,7 +54,6 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= @@ -281,6 +280,8 @@ go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/mock v0.2.0 h1:TaP3xedm7JaAgScZO7tlvlKrqT0p7I6OsdGB5YNSMDU= +go.uber.org/mock v0.2.0/go.mod h1:J0y0rp9L3xiff1+ZBfKxlC1fz2+aO16tw0tsDOixfuM= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -365,7 +366,6 @@ golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= diff --git a/net/peer/mock_peer/mock_peer.go b/net/peer/mock_peer/mock_peer.go index dc0a5b6a..5d6531b4 100644 --- a/net/peer/mock_peer/mock_peer.go +++ b/net/peer/mock_peer/mock_peer.go @@ -9,7 +9,7 @@ import ( reflect "reflect" time "time" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" drpc "storj.io/drpc" ) diff --git a/net/peer/peer_test.go b/net/peer/peer_test.go index 7aa8428c..a5275876 100644 --- a/net/peer/peer_test.go +++ b/net/peer/peer_test.go @@ -6,9 +6,9 @@ import ( "github.com/anyproto/any-sync/net/secureservice/handshake" "github.com/anyproto/any-sync/net/secureservice/handshake/handshakeproto" "github.com/anyproto/any-sync/net/transport/mock_transport" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "io" "net" _ "net/http/pprof" diff --git a/net/pool/mock_pool/mock_pool.go b/net/pool/mock_pool/mock_pool.go index be884903..7a304053 100644 --- a/net/pool/mock_pool/mock_pool.go +++ b/net/pool/mock_pool/mock_pool.go @@ -9,7 +9,7 @@ import ( reflect "reflect" peer "github.com/anyproto/any-sync/net/peer" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockPool is a mock of Pool interface. diff --git a/net/secureservice/secureservice_test.go b/net/secureservice/secureservice_test.go index 86735f66..0a6675dd 100644 --- a/net/secureservice/secureservice_test.go +++ b/net/secureservice/secureservice_test.go @@ -9,9 +9,9 @@ import ( "github.com/anyproto/any-sync/nodeconf" "github.com/anyproto/any-sync/nodeconf/mock_nodeconf" "github.com/anyproto/any-sync/testutil/testnodeconf" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "net" "testing" ) diff --git a/net/transport/mock_transport/mock_transport.go b/net/transport/mock_transport/mock_transport.go index e0428014..ddc13ea4 100644 --- a/net/transport/mock_transport/mock_transport.go +++ b/net/transport/mock_transport/mock_transport.go @@ -10,7 +10,7 @@ import ( reflect "reflect" transport "github.com/anyproto/any-sync/net/transport" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockTransport is a mock of Transport interface. diff --git a/net/transport/yamux/yamux_test.go b/net/transport/yamux/yamux_test.go index 9b209054..1fd6ba3a 100644 --- a/net/transport/yamux/yamux_test.go +++ b/net/transport/yamux/yamux_test.go @@ -10,9 +10,9 @@ import ( "github.com/anyproto/any-sync/nodeconf/mock_nodeconf" "github.com/anyproto/any-sync/testutil/accounttest" "github.com/anyproto/any-sync/testutil/testnodeconf" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "io" "net" "sync" diff --git a/nodeconf/mock_nodeconf/mock_nodeconf.go b/nodeconf/mock_nodeconf/mock_nodeconf.go index 353bf921..9b4c7d58 100644 --- a/nodeconf/mock_nodeconf/mock_nodeconf.go +++ b/nodeconf/mock_nodeconf/mock_nodeconf.go @@ -11,7 +11,7 @@ import ( app "github.com/anyproto/any-sync/app" nodeconf "github.com/anyproto/any-sync/nodeconf" chash "github.com/anyproto/go-chash" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockService is a mock of Service interface. diff --git a/util/periodicsync/mock_periodicsync/mock_periodicsync.go b/util/periodicsync/mock_periodicsync/mock_periodicsync.go index d34d6162..909b32e1 100644 --- a/util/periodicsync/mock_periodicsync/mock_periodicsync.go +++ b/util/periodicsync/mock_periodicsync/mock_periodicsync.go @@ -7,7 +7,7 @@ package mock_periodicsync import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockPeriodicSync is a mock of PeriodicSync interface. diff --git a/util/periodicsync/periodicsync_test.go b/util/periodicsync/periodicsync_test.go index 35dd848c..f45a940b 100644 --- a/util/periodicsync/periodicsync_test.go +++ b/util/periodicsync/periodicsync_test.go @@ -3,8 +3,8 @@ package periodicsync import ( "context" "github.com/anyproto/any-sync/app/logger" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "testing" "time" )