[chef] Re: Re: Testing advice


Chronological Thread 
  • From: Torben Knerr < >
  • To:
  • Cc: " " < >
  • Subject: [chef] Re: Re: Testing advice
  • Date: Wed, 30 Sep 2015 22:11:25 +0200


By the way: has anybody from this list actually tried infrataster or leibniz for multi-node integration testing?

That's one of the things on my list I always wanted to check out but really never came to it yet...



On Wed, Sep 30, 2015 at 9:36 PM, Yoshi Spendiff < " target="_blank"> > wrote:
For the Rspec tests I'm assuming you mean ChefSpec, in which case you only cover the code you write in your own cookbook. If you use the berkshelf plug-in then it by defaults filters the checks against code only in your cookbook. Remember to turn on code coverage resports.

These two posts cover it well:
https://sethvargo.com/chef-recipe-code-coverage/

For the ServerSpec tests you check that the end result scenario of all of your cookbook code worked, e.g. so certain services are started, certain files are created as the end result of a run (not files deployed by chef), certain ports are listening and so on. Avoid duplicating tests that the upstream cookbooks already implement and there's little point duplicating tests implemented by ChefSpec unless you're super duper paranoid about something working.

On 30 September 2015 at 11:48, Sean Farrow < " target="_blank"> > wrote:

Hello,

 

I am in the process of creating a cookbook that uses other cookbooks/recipe’s.

What RSpec/ServerSpec tests would people write in this situation?

Any advice appreciated.

Kind regards

Sean.






Archive powered by MHonArc 2.6.16.

§