File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -298,11 +298,18 @@ test-race: generate fmt vet manifests golang-tests-race
298298test : generate fmt vet manifests golang-tests
299299
300300# helm-tests will run helm chart unit tests
301+ # some evergreen machines have upgraded to Helm 4, which currently breaks installing the unittest plugin
302+ # see https://github.com/helm-unittest/helm-unittest/issues/777
301303helm-tests :
302304 @echo " Running helm chart unit tests..."
303305 @if ! helm plugin list | grep -q unittest; then \
304306 echo " Installing helm-unittest plugin..." ; \
305- helm plugin install https://github.com/helm-unittest/helm-unittest; \
307+ HELM_MAJOR_VERSION=$$(helm version --short | grep -oE 'v[0-9]+' | sed 's/v//' ) ; \
308+ if [ " $$ HELM_MAJOR_VERSION" = " 4" ]; then \
309+ helm plugin install https://github.com/helm-unittest/helm-unittest --verify=false; \
310+ else \
311+ helm plugin install https://github.com/helm-unittest/helm-unittest; \
312+ fi \
306313 fi
307314 helm unittest helm_chart --color
308315
You can’t perform that action at this time.
0 commit comments