Test style change#60
Conversation
|
Proposition 1: basically use bats syntax better. use Everything printed in the test will be output when the test fails, so feel free to produce nice error messages. Every line need to succeed for the test to succeed, so adding multiple commands to test things in a single test is OK as long as it makes sense. |
|
The second commit is not finished. It's just a suggestion to have a bash function to create a shorter "helm template test", since that's most of the tests. (it is what breaks tests right now in this PR) |
| } | ||
|
|
||
| helm_template_compare { | ||
| local valuefile="${BATS_TMPDIR}/values-${BATS_TEST_NUMBER}" |
|
@briiians ^ this should simplify your tests |
Co-authored-by: briiians <125086365+briiians@users.noreply.github.com>
fixed conflicts changed verbage in a comment made tests for the repoType feature using the new test method from Audun in pr varnish#60
|
I wanted to talk about this, but timezones and our schedules make it hard, so I'll make my case here:
I want to write That way the meaning of the arguments are clear from reading the line, and I want it to be easy to run in the terminal to make writing tests easier. (for example by sourcing the I believe the power and usefulness of using bats for testing is so that the tests are super easy to understand and write, and I don't want to lose that. All of this is open for discussion, suggestions are more than welcome from anyone, and my mind is not set on any specific format, but I want it to be easy and maintainable. |
Test ergonomics aren't great, so let's improve it.