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

added more .test.sh scripts for charts #137

Merged
merged 1 commit into from
Apr 6, 2021
Merged

added more .test.sh scripts for charts #137

merged 1 commit into from
Apr 6, 2021

Conversation

garethahealy
Copy link
Contributor

What is this PR About?

added more scripts to install/test/cleanup charts on an OCP cluster

How do we test this?

run _test/prow.sh against a cluster

cc: @redhat-cop/day-in-the-life

@garethahealy
Copy link
Contributor Author

CI has failed as it wants the chart versions bumped. nothing in the charts has actually changed, just a new file in the dir.

bump or not? thoughts @eformat @springdo @ckavili ?

@ckavili
Copy link
Contributor

ckavili commented Mar 27, 2021

I think no need to bump since it won't be mixed with helm's test approach but I was wondering what you (and the others) think to have chart tests and run helm test.. as check with Prow only for the updated charts as we have in lint or release step?

@garethahealy
Copy link
Contributor Author

@ckavili ; i think putting helm tests into the charts is a good idea. simplifies the testing for each chart.

looks like argocd doesn't support the hook (https://argoproj.github.io/argo-cd/user-guide/helm/).

do you know if the charts would need to be "installed" differently, i.e.: template vs install - does test work for both?

@ckavili
Copy link
Contributor

ckavili commented Mar 29, 2021

helm test only runs against a chart installed with helm install.. and test hook is only valid through a helm test command. (as far as I know) when you install a chart through Argo CD, it won't create the object that has "helm.sh/hook": test annotation.
and helm template .. | oc apply -f- is not helpful in this case as it creates the test object at the same time as application objects so it usually fails 🤷

@jtudelag
Copy link
Contributor

I came across this repo, might be useful...https://github.com/redhat-certification/chart-verifier

@garethahealy
Copy link
Contributor Author

raises a PR against them to get a github action added:

@garethahealy
Copy link
Contributor Author

@ckavili ; good to merge? or need anything changed?

@ckavili
Copy link
Contributor

ckavili commented Apr 5, 2021

one last thing 😅 would you also like to add --skip-tests parameter for helm template.. ones? ..when we have helm tests (#143) and also keep testing charts with helm template for Argo CD approach (#138), I think there is no need to run tests there since the hook won't be honored with template command 😁

@garethahealy
Copy link
Contributor Author

@ckavili ; pushed.

@ckavili
Copy link
Contributor

ckavili commented Apr 6, 2021

/lgtm
/approve

@ckavili ckavili merged commit c9d4c31 into redhat-cop:master Apr 6, 2021
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.

3 participants