golang / mock

GoMock is a mocking framework for the Go programming language.
Apache License 2.0
9.3k stars 610 forks source link

running tests with gomock #63

Closed sevki closed 4 years ago

sevki commented 7 years ago

when I try running tests with gomock vendored I get

./logic_test.go:17: cannot use mockCtrl (type *"github.com/golang/mock/gomock".Controller) as type *"github.com/foo/bar/vendor/github.com/golang/mock/gomock".Controller in argument to mock_db.NewMockDB

I'm running go version

go version go1.8 darwin/amd64

What I have done I have updated the gomock repo I have reinstalled mockgen I have regenerated mocks

What fixes it I have deleted the vendor gomock and it seems to work

codyoss commented 4 years ago

@sevki is this still an issue for you? I imagine the Go modules solves some of these pain points and your reason for vendoring?

sevki commented 4 years ago

I imagine it would be. I haven't had a reason to check for a while. I'm not entirely sure if I can even find the steps to reproduce this, so please feel free to close :)

codyoss commented 4 years ago

Awesome thanks.