Test-kitchen and those running minitest-handler


I noticed there were tests added to chef-client recently. It’s great to see tests starting to crop up in cookbooks. In our environments we have minitest-handler enabled, so that we can run validation tests across all of our systems.

Previously I was not running the chef-client::delete_validation, but the recent tests added to chef-client started failing. Now it is probably a good idea to run this recipe, so I have enabled it on all of my nodes, and all of the tests pass.

This begs the question. Tests can be written for test-kitchen to verify each recipe does what it should, but not every environment may execute each recipe that has a test (thus causing some tests fail, when using minitest-handler).

We use minitest-hanlder b/c we have things in our environment we cannot test in virtual box or a VM (e.g. Bonded interfaces, IPMI interfaces). Plus it’s nice to assert things are doing what you expect.