Replies: 1 comment 4 replies
-
|
Ooh I just found #222 and will check this out first |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
To be able to define more complex tests, it would be useful to be able to define parameterized tests, as seen in other testing frameworks or technologies, e.g.
Here's how this could work from the point of view of writing the tests. Let's say we have a
Deploymentdefinition like:and we want to ensure that there's a PodDisruptionBudget for each Deployment:
We could write a test like this:
There would be a test result per
Deploymentfound. The result set (combination ofparameters+documentSelector) should be allowed to be empty.Parametrized tests could also work will for simpler use cases, such as my question described here. In this case, we could just define a constant with a list of RoleBindings we want to test for:
I would love to hear your thoughts on this @quintush. We increasingly rely on helm unittest at work and would be happy to take a stab at contributing this functionality if we can agree that this makes sense.
This would solve a few issues brought up in the past:
Beta Was this translation helpful? Give feedback.
All reactions