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: automate mock generation v2 #18371

Merged
merged 6 commits into from
May 23, 2024

Conversation

blakepettersson
Copy link
Member

This is based on #11391, but with an upgraded version of Mockery which works with Go 1.22.

Closes #11390

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

WillAbides and others added 5 commits May 23, 2024 00:46
Signed-off-by: Will Roden <will@roden.cc>
Signed-off-by: Will Roden <will@roden.cc>
Signed-off-by: Will Roden <will@roden.cc>
Signed-off-by: Will Roden <will@roden.cc>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
@blakepettersson blakepettersson changed the title chore: automate mock generation, v2 chore: automate mock generation v2 May 22, 2024
@blakepettersson blakepettersson marked this pull request as ready for review May 22, 2024 23:30
@blakepettersson blakepettersson requested a review from a team as a code owner May 22, 2024 23:30
Copy link

codecov bot commented May 22, 2024

Codecov Report

Attention: Patch coverage is 1.23457% with 880 lines in your changes are missing coverage. Please review.

Project coverage is 44.94%. Comparing base (d73eb8f) to head (51c4197).

Files Patch % Lines
...ices/scm_provider/azure_devops/git/mocks/Client.go 0.92% 525 Missing and 10 partials ⚠️
...kg/apiclient/cluster/mocks/ClusterServiceServer.go 0.00% 64 Missing ⚠️
util/db/mocks/ArgoDB.go 0.00% 45 Missing and 13 partials ⚠️
util/notification/argocd/mocks/Service.go 0.00% 41 Missing ⚠️
...kg/apiclient/session/mocks/SessionServiceClient.go 0.00% 39 Missing ⚠️
controller/cache/mocks/LiveStateCache.go 14.63% 22 Missing and 13 partials ⚠️
...kg/apiclient/session/mocks/SessionServiceServer.go 0.00% 33 Missing ⚠️
...oserver/apiclient/mocks/RepoServerServiceClient.go 0.00% 17 Missing and 11 partials ⚠️
util/git/mocks/Client.go 0.00% 17 Missing and 11 partials ⚠️
util/helm/mocks/Client.go 0.00% 8 Missing and 3 partials ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #18371      +/-   ##
==========================================
- Coverage   45.68%   44.94%   -0.75%     
==========================================
  Files         353      354       +1     
  Lines       46965    47739     +774     
==========================================
  Hits        21454    21454              
- Misses      22772    23482     +710     
- Partials     2739     2803      +64     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blakepettersson blakepettersson changed the title chore: automate mock generation v2 chore: automate mock generation v2 May 23, 2024
Copy link
Member

@pasha-codefresh pasha-codefresh left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@pasha-codefresh pasha-codefresh merged commit 049900e into argoproj:master May 23, 2024
28 of 29 checks passed
@blakepettersson blakepettersson deleted the mockery-v2 branch May 23, 2024 08:17
rumstead pushed a commit to rumstead/argo-cd that referenced this pull request Jun 6, 2024
* Add go:generate statements for mockery

Signed-off-by: Will Roden <will@roden.cc>

* revert whitespace change

Signed-off-by: Will Roden <will@roden.cc>

* go generate everything

Signed-off-by: Will Roden <will@roden.cc>

* make gogen

Signed-off-by: Will Roden <will@roden.cc>

* chore: upgrade to mockery v2.40.2

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

---------

Signed-off-by: Will Roden <will@roden.cc>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: Will Roden <will@roden.cc>
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
mkieweg pushed a commit to mkieweg/argo-cd that referenced this pull request Jun 11, 2024
* Add go:generate statements for mockery

Signed-off-by: Will Roden <will@roden.cc>

* revert whitespace change

Signed-off-by: Will Roden <will@roden.cc>

* go generate everything

Signed-off-by: Will Roden <will@roden.cc>

* make gogen

Signed-off-by: Will Roden <will@roden.cc>

* chore: upgrade to mockery v2.40.2

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

---------

Signed-off-by: Will Roden <will@roden.cc>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: Will Roden <will@roden.cc>
Hariharasuthan99 pushed a commit to AmadeusITGroup/argo-cd that referenced this pull request Jun 16, 2024
* Add go:generate statements for mockery

Signed-off-by: Will Roden <will@roden.cc>

* revert whitespace change

Signed-off-by: Will Roden <will@roden.cc>

* go generate everything

Signed-off-by: Will Roden <will@roden.cc>

* make gogen

Signed-off-by: Will Roden <will@roden.cc>

* chore: upgrade to mockery v2.40.2

Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>

---------

Signed-off-by: Will Roden <will@roden.cc>
Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
Co-authored-by: Will Roden <will@roden.cc>
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.

Generate mocks with make gogen
3 participants