You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
too often, I find that I'm re-creating acceptance test suites from scratch, so the lead time to do any sort of TDD becomes too long. also this leads to test cases being a bit different from file to file, and then debugging failed tests becomes an archaeological dig. my hypothesis is that this is because we have multiple ways to write tests / fixtures / helpers, and we've also probably got some repeated code that is causing authors to have to reinvent the wheel repeatedly.
since we have a good chunk of test coverage now, I propose that we're able to do a little refactoring to do the following:
standardize fixture instantiation - we have a couple of cool methods using go templating thanks to @mitchnielsen , so there should be a way to make the naming and patterns consistent (eg. when do we create new resources for update assertions?)
standardize and share custom test checks - we have a couple of custom check functions mainly used to verify if the remote API has the resource object created in the TF test. These are pretty repetitive and basically re-implement Get() logic. We should look to standardize these common ones into shared helpers, but also find a way to codify a pattern so that test authors know exactly how/when to write a new custom check function
parkedwards
changed the title
tests: refactor so that we have consistent fixtures / test utils
tests: overhaul to update to 1.11.0 patterns and enforce better consistency
Dec 26, 2024
parkedwards
changed the title
tests: overhaul to update to 1.11.0 patterns and enforce better consistency
tests: overhaul to update to 1.10.x patterns and enforce better consistency
Dec 26, 2024
too often, I find that I'm re-creating acceptance test suites from scratch, so the lead time to do any sort of TDD becomes too long. also this leads to test cases being a bit different from file to file, and then debugging failed tests becomes an archaeological dig. my hypothesis is that this is because we have multiple ways to write tests / fixtures / helpers, and we've also probably got some repeated code that is causing authors to have to reinvent the wheel repeatedly.
since we have a good chunk of test coverage now, I propose that we're able to do a little refactoring to do the following:
Check
func that we use as "Legacy" + indicates that we should use the newConfigStateChecks
attribute as well as State Check implementationsGet()
logic. We should look to standardize these common ones into shared helpers, but also find a way to codify a pattern so that test authors know exactly how/when to write a new custom check functionThe text was updated successfully, but these errors were encountered: