chore_: mock_peer package name, clean command

This commit is contained in:
Igor Sirotin 2024-09-25 12:09:40 +01:00
parent 8a2366c96b
commit e339541946
No known key found for this signature in database
GPG Key ID: 425E227CAAB81F95
3 changed files with 12 additions and 3 deletions

View File

@ -316,6 +316,13 @@ generate:
@packages=$$(go list ./... | grep -v "./contracts"); \
go generate $$packages
clean-generated: SHELL := /bin/sh
clean-generated:
# Remove anything generated, excluding ./vendor and ./contracts directories
find . -type d -name "mock" ! -path "./vendor/*" ! -path "./contracts/*" -exec rm -rf {} +
# In theory this is only ./transactions/fake/mock.go
find . -type f -name "mock.go" ! -path "./vendor/*" -exec echo {} +
download-uniswap-tokens:
go run ./services/wallet/token/downloader/main.go

View File

@ -1,6 +1,6 @@
package chain
//go:generate mockgen -package=mock_client -package=mock_client -source=client.go -destination=mock/client/client.go
//go:generate mockgen -package=mock_client -source=client.go -destination=mock/client/client.go
import (
"context"

View File

@ -7,6 +7,8 @@ import (
"github.com/stretchr/testify/suite"
"go.uber.org/mock/gomock"
"github.com/status-im/status-go/services/peer/mock"
)
func TestPeerSuite(t *testing.T) {
@ -17,12 +19,12 @@ type PeerSuite struct {
suite.Suite
api *PublicAPI
s *Service
d *MockDiscoverer
d *mock_peer.MockDiscoverer
}
func (s *PeerSuite) SetupTest() {
ctrl := gomock.NewController(s.T())
s.d = NewMockDiscoverer(ctrl)
s.d = mock_peer.NewMockDiscoverer(ctrl)
s.s = New()
s.api = NewAPI(s.s)
}