We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2.9.0, macos
Mockery fails to generate mocks and outputs an empty file, when a path including 'vendor' exists in the target interface's import statements.
note: the included package is not a 3rd party package vendored. there's db table named 'vendor' and /pkg/models/vendor pkg has ORM for it.
/pkg/models/vendor
package hihi import ( vendorModel "github.com/<org>/<project>/pkg/models/vendor" // it's NOT 3rd party package ) type Hihi interface { GetVendor() vendorModel.Vendor }
[10:26:59] → mockery --all 13 Sep 21 12:15 KST INF Starting mockery dry-run=false version=2.9.0 13 Sep 21 12:15 KST INF Walking dry-run=false version=2.9.0 13 Sep 21 12:15 KST INF Generating mock dry-run=false interface=Hihi qualified-name=github.com/<org>/<project>/pkg/services/hihi version=2.9.0 Between the lines is the file (mock.go) mockery generated in-memory but detected as invalid: -------------------------------------------------------------------------------------------- // Code generated by mockery 2.9.0. DO NOT EDIT. package mocks import hihi "github.com/<org>/<project>/pkg/services/hihi" import mock "github.com/stretchr/testify/mock" import vendor "" // should be "github.com/<org>/<project>/pkg/models/vendor" (...) Error walking Hihi: mock.go:7:15: invalid import path: ""
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Env
v2.9.0, macos
Problem
Mockery fails to generate mocks and outputs an empty file,
when a path including 'vendor' exists in the target interface's import statements.
Detail
note: the included package is not a 3rd party package vendored. there's db table named 'vendor' and
/pkg/models/vendor
pkg has ORM for it.Example source
Output
The text was updated successfully, but these errors were encountered: