[chef] Re: Meet test-kitchen


Chronological Thread 
  • From: Torben Knerr < >
  • To:
  • Subject: [chef] Re: Meet test-kitchen
  • Date: Sat, 18 Aug 2012 16:45:15 +0200

Absolutely Nice!

So far I have just read the README.md and it looks very very nice. I
have not actually tried it out yet, but from reading the README some
questions came up:


1) Concerning cookbooks with dependencies to other cookbooks:

Having noticed the librarian Cheffile in the
apache2/test/kitchen/cookbooks directory, I wonder whether the
cookbook dependencies therein are automatically resolved by
test-kitchen, are they? Would a Berksfile be supported as well?

If these dependencies are indeed automatically resolved then that
would be worth mentioning in the README.md


2) Do you have an example with test-kitchen tests running on Travis
CI? Btw: can you actually spin up a vagrant VM on Travis?


3) Concerning fast running tests:

It would be great to have fast running unit-like tests (which don't
require to spin up a vagrant VM first) covered by test-kitchen as
well. Chefspec comes to my mind, but I haven't found it referenced in
the README.

Oh wait, isn't that already supported by the cookbook / script
parameter which defaults to 'rspec spec'? Or would I do that within
the cookbook / preflight command to make sure this runs _before_ the
vagrant VM is spun up?


4) Concerning integration_test:

The README "Kitchenfile DSL" section talks about a features dir
underneath the <cookbook>/test/kitchen dir, but in the examples I see
only <cookbook>/test/features?

Also, is the "integration_test" block in the Kitchenfile really
necessary to run the features? From the "Cucumber" section above,
which says "Test Kitchen will run any features in the test/features
subdirectory tagged with the configuration name in order to check that
the service is working as expected.", it sounds like you wouldn't need
to do anything extra to make the cucumber features run. In general,
the "integration_test" section really confused me...


5) Runtimes?

I don't get what the cookbook and integration_test runtimes parameter
is good for. Why does RVM need to be installed on the base box? Are
you running the features locally on the target box? I would have
expected that the features are run from the outside (e.g. on my
workstation) against the provisioned target vm (the "black box"), so
why would I care that RVM is installed inside that black box?!?


I guess most of my questions are based on misunderstandings. Please
forgive the fact that I haven't actually run test-kitchen yet... :-)

Anyways, thanks for all the Chef awesomeness!

Cheers,
Torben


On Fri, Aug 17, 2012 at 6:00 PM, Joshua Timberman 
< >
 wrote:
> Ohai Chefs!
>
> Today we released test-kitchen, a framework for running integration tests 
> in an isolated environment. It uses Vagrant and Chef under the hood to set 
> up a single system for converging your cookbook, and optionally running 
> rspec/minitest/cucumber tests.
>
> It is released as a RubyGem, and issues are tracked in our Open Source 
> ticket system.
>
> * http://bit.ly/test-kitchen
>
> --
> Opscode, Inc
> Joshua Timberman, Technical Program Manager
> IRC, Skype, Twitter, Github: jtimberman
>



Archive powered by MHonArc 2.6.16.

§