diff --git a/.gitignore b/.gitignore index 1f081b431..8289c1e8c 100644 --- a/.gitignore +++ b/.gitignore @@ -114,3 +114,4 @@ integration-tests/*.log # generated files mock +mock.go diff --git a/multiaccounts/settings/database_settings_manager.go b/multiaccounts/settings/database_settings_manager.go index 1fa79eb5b..336d5fd81 100644 --- a/multiaccounts/settings/database_settings_manager.go +++ b/multiaccounts/settings/database_settings_manager.go @@ -1,6 +1,6 @@ package settings -//go:generate mockgen -package=mocksettings -source=database_settings_manager.go -destination=mocks/database_settings_manager_mock.go +//go:generate mockgen -package=mock_settings -source=database_settings_manager.go -destination=mock/database_settings_manager.go import ( "database/sql" diff --git a/services/peer/service.go b/services/peer/service.go index 1d6360f48..4fc39d279 100644 --- a/services/peer/service.go +++ b/services/peer/service.go @@ -1,6 +1,6 @@ package peer -//go:generate mockgen -package=peer -source=service.go -destination=discoverer_mock.go +//go:generate mockgen -package=mock_peer -source=service.go -destination=mock/service.go import ( "github.com/ethereum/go-ethereum/node" diff --git a/services/wallet/router/pathprocessor/processor.go b/services/wallet/router/pathprocessor/processor.go index 3c4b7d226..d543baf73 100644 --- a/services/wallet/router/pathprocessor/processor.go +++ b/services/wallet/router/pathprocessor/processor.go @@ -1,6 +1,6 @@ package pathprocessor -//go:generate mockgen -package=mock_pathprocessor -source=processor.go -destination=mock_pathprocessor/processor.go +//go:generate mockgen -package=mock_pathprocessor -source=processor.go -destination=mock/processor.go import ( "math/big" diff --git a/services/wallet/transfer/transaction_manager_multitransaction_test.go b/services/wallet/transfer/transaction_manager_multitransaction_test.go index 3c638a597..9e9d3f9ba 100644 --- a/services/wallet/transfer/transaction_manager_multitransaction_test.go +++ b/services/wallet/transfer/transaction_manager_multitransaction_test.go @@ -24,7 +24,6 @@ import ( "github.com/status-im/status-go/services/wallet/walletevent" "github.com/status-im/status-go/t/helpers" "github.com/status-im/status-go/transactions" - "github.com/status-im/status-go/transactions/mock_transactor" "github.com/status-im/status-go/walletdatabase" ) diff --git a/transactions/transactor.go b/transactions/transactor.go index cddc78ff7..41708fff4 100644 --- a/transactions/transactor.go +++ b/transactions/transactor.go @@ -1,6 +1,6 @@ package transactions -//go:generate mockgen -source=transactor.go -destination=mock_transactor/transactor.go +//go:generate mockgen -package=mock_transactions -source=transactor.go -destination=mock/transactor.go import ( "bytes" diff --git a/transactions/transactor_test.go b/transactions/transactor_test.go index 220399809..e6ffc4267 100644 --- a/transactions/transactor_test.go +++ b/transactions/transactor_test.go @@ -27,6 +27,7 @@ import ( "github.com/status-im/status-go/sqlite" "github.com/status-im/status-go/t/utils" "github.com/status-im/status-go/transactions/fake" + mock_fake "github.com/status-im/status-go/transactions/fake/mock" ) func TestTransactorSuite(t *testing.T) { @@ -39,7 +40,7 @@ type TransactorSuite struct { server *gethrpc.Server client *gethrpc.Client txServiceMockCtrl *gomock.Controller - txServiceMock *fake.MockPublicTransactionPoolAPI + txServiceMock *mock_fake.MockPublicTransactionPoolAPI nodeConfig *params.NodeConfig manager *Transactor