Skip to content

adding helm-unittest plugin binary#576

Merged
cert-manager-prow[bot] merged 1 commit into
cert-manager:mainfrom
hjoshi123:feat/helm-unittest
Apr 5, 2026
Merged

adding helm-unittest plugin binary#576
cert-manager-prow[bot] merged 1 commit into
cert-manager:mainfrom
hjoshi123:feat/helm-unittest

Conversation

@hjoshi123
Copy link
Copy Markdown
Contributor

This PR adds makefile targets to use the helm plugin helm-unittest. It doesn't directly use the helm plugin install command instead it downloads the binary behind the plugin and consumes that to run the helm unit tests. This is a much safer way to do it in my opinion as we can target a specific version of the binary through github releases and also use renovate to upgrade the version.

Signed-off-by: hjoshi123 <mail@hjoshi.me>
@cert-manager-prow cert-manager-prow Bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 5, 2026
@erikgb
Copy link
Copy Markdown
Member

erikgb commented Apr 5, 2026

@hjoshi123, thanks for this, but I think something is missing here. When I tested your branch in trust-manager, without any additional changes, I get a lot of errors in the build logs:

make/_shared/helm///helm.mk:121: warning: undefined variable 'NEEDS_HELM-UNITTEST'
/home/erikbo/projects/github/trust-manager/_bin/tools/boilersuite .
make/_shared/generate-verify//util/verify.sh make generate-applyconfigurations
make[1]: Entering directory '/tmp/verify.sh.NENz9LmG'

@hjoshi123
Copy link
Copy Markdown
Contributor Author

@erikgb was the tools makefile copied too?

@erikgb
Copy link
Copy Markdown
Member

erikgb commented Apr 5, 2026

@erikgb was the tools makefile copied too?

Ahhh, I need to update both the helm AND the tools module. Then it works! Sorry!

$ make verify-helm-unittest 
/home/erikbo/projects/github/trust-manager/_bin/tools/yq '.annotations."artifacthub.io/prerelease" = "false"' --inplace deploy/charts/trust-manager/Chart.yaml
/home/erikbo/projects/github/trust-manager/_bin/tools/helm-unittest deploy/charts/trust-manager

### Chart [ trust-manager ] deploy/charts/trust-manager


Charts:      1 passed, 1 total
Test Suites: 0 passed, 0 total
Tests:       0 passed, 0 total
Snapshot:    0 passed, 0 total
Time:        1.41308ms

Copy link
Copy Markdown
Member

@erikgb erikgb left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, @hjoshi123! I have tested that this change doesn't break anything, ref. the comment above. And merging this will allow you to continue your work.

/lgtm
/approve

@cert-manager-prow cert-manager-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 5, 2026
@cert-manager-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: erikgb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 5, 2026
@hjoshi123
Copy link
Copy Markdown
Contributor Author

I did notice one thing though, in cert-manager we dont include the helm.mk file in the root makefile.. so we might have to manually add the target in ci.mk probably

@cert-manager-prow cert-manager-prow Bot merged commit d6c03d5 into cert-manager:main Apr 5, 2026
5 checks passed
@erikgb
Copy link
Copy Markdown
Member

erikgb commented Apr 5, 2026

I did notice one thing though, in cert-manager we dont include the helm.mk file in the root makefile.. so we might have to manually add the target in ci.mk probably

Maybe cert-manager doesn't use the Helm module yet? It would be great to let cert-manager use more makefile-modules.

@hjoshi123
Copy link
Copy Markdown
Contributor Author

I did notice one thing though, in cert-manager we dont include the helm.mk file in the root makefile.. so we might have to manually add the target in ci.mk probably

Maybe cert-manager doesn't use the Helm module yet? It would be great to let cert-manager use more makefile-modules.

Yeah they do clone it in _shared_new but only include certain makefiles inside it.. yeah it might be worth to include them now that we have a usecase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants