chore_: mock_peer package name, clean command
This commit is contained in:
parent
8a2366c96b
commit
e339541946
7
Makefile
7
Makefile
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue