Open ghost opened 8 years ago
What does the correct output from starting the collector look like?
Collector communication with the server is a collector private business. It should not be exposed to the cookbook level. Converge should not be failing when collector wasn't able to communicate with the server (including :start
action).
I should be able to have successful converge in kitchen using dummy (not real) credentials when implementing my private wrapper cookbook. I should be able to cover my cookbook with tests that is checking dummy credentials are provisioned to where collector expecting them to be. That is a huge blocker to the teams doing TDD, basically to any team that has definition of done somewhat broader than having a working code snippet, a team that cares about code quality.
Serverspec integration test should include a test for successful collector registration. The actual logic is self-contained and run when you start the collector, so we should simply look for the correct output from starting the collector. Hitting the endpoint is redundant.