One way is to use the minitest-handler cookbook. If this cookbook is included in your run, then all minitest tests present in files/default/tests/
are executed at the end of your run, and the Chef run either fails if tests fail, or succeeds if all tests passed.
Then on top of the community tests, you add some specific tests to your service in your application-cookbook
.
However, I have been noticing a lack of minitest tests, and more and more people using ServerSpec
. From my brief investigation, running tests on your machine during a chef run is not something that you do using ServerSpec.