问题
I want to run different test suites on my helm release in different (partly manual) CI jobs.
How do I best execute these test suites from a CI job?
Details:
With a single test suite, helm test
is very helpful. But how can I easily tell helm test
which test suite to execute?
Currently, I have only two test suites A
and B
and an environment variable SUITE
I inject via helm install. The test job decides based on the value of SUITE
which test suite to execute. But this injection is complex and I would like to have the possibility to execute multiple test suites sequentially or concurrently.
Thus I created two helm charts A.yaml
and B.yaml
. Can I somehow call helm test
with a specific helm chart, e.g. helm test general/A.yaml
(see Can Helm test be used to run separate suites?)?
If not, what is the best approach? Using deployment-A
and deployment-B
with instances 0 and scale a deployment to 1 when we want to execute it? How do I then communicate the (un-)successful test execution (and log output) back to CI (gitlab in my case)?
回答1:
I'm afraid this is not currently supported in helm (check out this opened issue on github).
What you can do instead is create separate chart folder with one of the tests in it or check out Octopus. It was created to replace helm test
with additional functionalities and one of them is selective testing.
来源:https://stackoverflow.com/questions/63011453/how-to-choose-which-test-suite-to-run-on-my-helm-release