<@U06RKAMK0UC> how can I generate new mocks inside...
# ask-ai
b
@ancient-wolf-19325 how can I generate new mocks inside flytectl repository
a
To generate new mocks inside the
flytectl
repository, you can use the
mockery
tool. According to this pull request, Flyte has migrated to using
vektra/mockery
for generating mocks. Here’s a basic example of how to generate a mock for an interface: 1. Install Mockery: Ensure you have
mockery
installed. You can install it using:
Copy code
go install <http://github.com/vektra/mockery/v2/.../|github.com/vektra/mockery/v2/.../>
2. Generate Mocks: Use the
mockery
command to generate mocks. For example, to generate a mock for an interface named `MyInterface`:
Copy code
mockery --name=MyInterface --output=./mocks --case=underscore --with-expecter
Would you like more detailed steps or examples? Sources: - this pull request 👍 1 button 👎 0 button 💡 Hint: Mention @ancient-wolf-19325 in the thread for followups.