Running the command mockery in the root directory successfully generates files for the mocked interfaces. However, the issue is that it is importing internal packages, as shown in the picture below.
Mockery Version
v2.40.1
Golang Version
1.21.6 darwin/arm64
Installation Method
[ ] Binary Distribution
[ ] Docker
[x] brew
[ ] go install
[ ] Other: [specify]
Steps to Reproduce
Run mockery
File generated with wrong imports
Running test cases will fail as shown below
Expected Behavior
The expected behavior is to import from a public package. I had to modify it to make it work, as shown below in the picture:
Actual Behavior
Importing from the incorrect location, as shown above, is not allowed. As a result, test cases won't run, as illustrated below:
Thanks, in advance for your help, and I hope I made it clear 🙏🏻
Description
I am creating a mock for my Google Pub/Sub client to be tested without making actual calls to Google Pub/Sub. I am mocking an interface defined below.
And here is my mockery config
Running the command mockery in the root directory successfully generates files for the mocked interfaces. However, the issue is that it is importing internal packages, as shown in the picture below.![Screenshot 2024-01-20 at 7 46 01 PM](https://github.com/vektra/mockery/assets/35840833/ee4c2b6e-d622-4122-9359-4914d6bcc318)
Mockery Version
v2.40.1
Golang Version
1.21.6 darwin/arm64
Installation Method
Steps to Reproduce
Expected Behavior
The expected behavior is to import from a public package. I had to modify it to make it work, as shown below in the picture:
Actual Behavior
Importing from the incorrect location, as shown above, is not allowed. As a result, test cases won't run, as illustrated below:![Screenshot 2024-01-20 at 8 02 48 PM](https://github.com/vektra/mockery/assets/35840833/1d9cf308-5155-487f-b098-056b23d8e493)
Thanks, in advance for your help, and I hope I made it clear 🙏🏻