[chef] Re: Couple of test-kitchen questions


Chronological Thread 
  • From: Joshua Timberman < >
  • To: "< >" < >
  • Cc: " " < >
  • Subject: [chef] Re: Couple of test-kitchen questions
  • Date: Sun, 4 Nov 2012 02:07:26 +0000
  • Accept-language: en-US

Ohai!

On Nov 2, 2012, at 16:20, "David Petzel" 
< >
 wrote:

> 1) Shutting down a Configuration after test: If I have multiple 
> configurations lets say 4 ( a client and a server configuration on 2 
> platforms). It seems like the VMs are spun up serially, and one is 
> completed its left on while the next is started. Is it possible to have the 
> original shutdown (without destroy) at the end of the run, so I'm not left 
> with 4 VMs spinning by the end of the test? The --teardown option seems to 
> imply the VMs will be destroyed?

What about simply leveraging your shell?

bundle exec kitchen test && bundle exec kitchen destroy

Then the environment would only be torn down if the run was successful.

> 2) Almost in contrast of my first question, I'm wondering how to speed up 
> tests during quick iteration cycles. Before test-kitchen, using standalone 
> Vagrant files, I could just run vagrant provision blah over and over as I 
> fine tune things for a set configuration. I understand that I can use the 
> --configuration and the --platform options to `kitchen test` to limit the 
> scope of the test, but ideally I'd like to skip all the pre-checks as well, 
> especially the "Validating ruby files" which seems obnoxiously slow on my 
> machine.  I still want all checks to run when I think I have a finished 
> product, just not while I'm iterating through and fine tuning a recipe. Any 
> way to pull that off?

Validating ruby files is the knife cookbook test command that checks syntax 
of the rb and erb. That should be pretty fast, though as it stores the 
checksums with a time stamp and only checks files that have changed.

There seem to be other opportunities for optimization, though.

1. The cookbook assembly with librarian happens very run. I am not sure if 
this is due to librarian or test kitchens use of it.

2. Berkshelf may be faster at resolution of dependencies based on 
conversations I hea at the chef summit. A ticket is open for this in the 
kitchen project.

3. The test-kitchen cookbook itself does some work that may not be required, 
such as using the rvm cookbook and installing fit and other things 
beforehand. 

If you can think of others, please open tickets.



Archive powered by MHonArc 2.6.16.

§