I am writing rspec tests for tools that interact with the chef, i.e. pushing of new cookbooks to the chef-server, creating Chef::Node objects from asset-tracking system.
I was thinking of firing up a chef-zero instance to used as the backend for these tests. A couple issues I see:
chef-zero requires a port to be specified. Since there may be multiple tests running simultaneously, need to use different ports. I suppose I could iterate over a range of ports and use that one if it succeeds.
Teardown. I suppose an after(:all) clause to do a zero.stop would do the trick.
Before I start, has anyone else gone down this path?