[chef] Re: Testing advice


Chronological Thread 
  • From: Ranjib Dey < >
  • To: " " < >
  • Subject: [chef] Re: Testing advice
  • Date: Wed, 30 Sep 2015 12:20:57 -0700

we use chefspec for unit testing, and raw LXC + rsepc (with ruby telnet, blender etc based matchers) for integration testing. the whole thing is CI/CDed under GoCD. We had blogged about it in past[1]. Its pretty backdated now, our spec helper modules have changed a lot after blender releases, to support multi node testing (for zk. cass clusters) as well as after GoCD became opensource. You can check the GoatOS project which is takes similar approach for testing chef along side cookbook against every chef master changes.

I have avoided using serverspec for its limitations related to single node specs, as well as weird library styles and issue tracking. also during functional tests i tend to test the outcome of a chef role/cookbook rather than individual resources, like zookeeper functional tests will do a telnet against zk hosts' port 2171 and check for stats. Or for mysql its ability to upload fixture data.

hth
ranjib
[1]https://www.pagerduty.com/blog/chef-testing-pagerduty/


On Wed, Sep 30, 2015 at 11:48 AM, 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.

§