Skip to content
New issue

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

chore: add mockery generate directive #343

Merged
merged 2 commits into from
Oct 31, 2024
Merged

Conversation

MR2011
Copy link
Collaborator

@MR2011 MR2011 commented Oct 31, 2024

Description

This PR adds go:generate directive to generate the mockery via go generate

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help
  • Separate ticket for tests # (issue/pr)

Added to documentation?

  • πŸ“œ README.md
  • 🀝 Documentation pages updated
  • πŸ™… no documentation needed
  • (if applicable) generated OpenAPI docs for CRD changes

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@drochow drochow merged commit d126a34 into main Oct 31, 2024
7 checks passed
@drochow drochow deleted the mr2011/-/mockery-generation branch October 31, 2024 10:29
Copy link
Collaborator

@copyonwrite copyonwrite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I only look at the Makefile, mockery appears out of nowhere. Would it make sense to have an explicit 'go install ...' target in the Makefile for mockery? For me this would make it more transparent, where mockery comes from.

@dorneanu
Copy link
Collaborator

dorneanu commented Nov 1, 2024

When I only look at the Makefile, mockery appears out of nowhere. Would it make sense to have an explicit 'go install ...' target in the Makefile for mockery? For me this would make it more transparent, where mockery comes from.

That makes sense! I suggest an extra target in the Makefile where we install all tooling/debugging related dependencies:

install-deps: 
    go install github.com/go-delve/delve/cmd/dlv@latest
    go install golang.org/x/tools/gopls@latest
    go install github.com/onsi/ginkgo/v2/ginkgo@latest
    # same with mockery 
   ... 

dustindemmerle pushed a commit that referenced this pull request Nov 6, 2024
* chore: add mockery generate directive

* fix(test): changed order of code generation

---------

Co-authored-by: David Rochow <[email protected]>
dustindemmerle pushed a commit that referenced this pull request Nov 25, 2024
* chore: add mockery generate directive

* fix(test): changed order of code generation

---------

Co-authored-by: David Rochow <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants