Skip to content

chore: official Helm mocks #168

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

Merged
merged 5 commits into from
Jul 1, 2025
Merged

Conversation

bernielomax
Copy link
Contributor

@bernielomax bernielomax commented Jul 1, 2025

The PR replaces in house created Helm mocks, and replaces them with automatically generated mocks. Meaning we can remove the subset Helm Client interface and just use the Official client interface. Next I will aim to write some shared internal/helm functions that can perform actions using the official Helm client interface as an argument.

@bernielomax bernielomax changed the title chore: Helm mocks chore: official Helm mocks Jul 1, 2025
@bernielomax bernielomax force-pushed the bernielomax/chore/helm-mocks branch 2 times, most recently from 78863af to d8aa1ca Compare July 1, 2025 16:28
@bernielomax bernielomax marked this pull request as ready for review July 1, 2025 16:31
@bernielomax bernielomax requested a review from a team as a code owner July 1, 2025 16:31
Copy link
Member

@colesnodgrass colesnodgrass left a comment

Choose a reason for hiding this comment

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

Should we be using the tool directive?

@bernielomax
Copy link
Contributor Author

Ah yes! I was trying to remember how this was now managed and couldn't find it. I'll fix that up.

@bernielomax
Copy link
Contributor Author

@colesnodgrass fixup added.

Abctl creates a subset interface based on Go Helms official
client interface. Just use the official interface since it
can now be mocked.
  * Replaced table-driven tests with direct mock setup for single-case tests to improve readability and reduce unnecessary indirection.
  * Used GoMock idioms (.Return, .Times, .After) for retry logic to make mock expectations clearer and more robust.
  * Added comments to clarify mock and test intent, aiding future maintainers.
  * Ensured all retry, error, and success paths are covered to match production logic and prevent regressions.
  * Maintained test and code coverage at the level of the main branch to ensure no loss in quality.
@bernielomax bernielomax force-pushed the bernielomax/chore/helm-mocks branch from b38dbca to 32a5eae Compare July 1, 2025 22:48
@bernielomax bernielomax merged commit 71b6059 into main Jul 1, 2025
2 checks passed
@bernielomax bernielomax deleted the bernielomax/chore/helm-mocks branch July 1, 2025 22:49
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.

2 participants