How to test multiple cookbooks with Test Kitchen 1.0?

Hi,

I’ve been seeking the ways how to test multiple cookbooks on 1 vagrant
instance.

I’m using Test Kitchen 1.0 and the test of single cookbook works fine with
the structure below.

CookbookA
— test
— integration
— serverspec
— localhost
— foo_spec.rb

I have CookbookB, CookbookC… and I’d like to run all tests of all
cookbooks on 1 vagrant instance
because it takes long time to import vagrant machine per cookbook and I
want to test integrity of all cookbooks.

When I used Test Kitchen 0.7, I could test cookbooks with the technique
described in https://gist.github.com/ingineering/4323301 .
But I think on Test Kitchen 1.0, I think this technique can not be used.

Thanks!!

Ryutaro YOSHIBA / Ryuzee
http://www.ryuzee.com
http://twitter.com/ryuzee

On 6/21/2013 4:52 PM, Ryutaro YOSHIBA wrote:

Hi,

I've been seeking the ways how to test multiple cookbooks on 1 vagrant
instance.

I believe this is what the run_list is for in a TK "suite"

I'm using Test Kitchen 1.0 and the test of single cookbook works fine
with the structure below.

CookbookA
--- test
--- integration
--- serverspec
--- localhost
--- foo_spec.rb
I have CookbookB, CookbookC... and I'd like to run all tests of all
cookbooks on 1 vagrant instance
because it takes long time to import vagrant machine per cookbook and
I want to test integrity of all cookbooks.

When I used Test Kitchen 0.7, I could test cookbooks with the
technique described in Testing multiple cookbooks with test-kitchen · GitHub .
But I think on Test Kitchen 1.0, I think this technique can not be used.

Thanks!!

--

Ryutaro YOSHIBA / Ryuzee
http://www.ryuzee.com
http://twitter.com/ryuzee

Thanks Jeff

I suppose .kitchen.yml must be located in the cookbook directory and only I
can write in run_list are the names of recipes which are located in this
cookbook.
Is it right?
But all I want to do is to test multiple cookbooks(not multiple recipes)
all at once without destroying vagrant instance per each cookbook...

2013/6/22 Jeff Blaine jblaine@kickflop.net

On 6/21/2013 4:52 PM, Ryutaro YOSHIBA wrote:

Hi,

I've been seeking the ways how to test multiple cookbooks on 1 vagrant
instance.

I believe this is what the run_list is for in a TK "suite"

https://github.com/opscode/**test-kitchen/wiki/Getting-**Startedhttps://github.com/opscode/test-kitchen/wiki/Getting-Started

I'm using Test Kitchen 1.0 and the test of single cookbook works fine
with the structure below.

CookbookA
--- test
--- integration
--- serverspec
--- localhost
--- foo_spec.rb
I have CookbookB, CookbookC... and I'd like to run all tests of all
cookbooks on 1 vagrant instance
because it takes long time to import vagrant machine per cookbook and I
want to test integrity of all cookbooks.

When I used Test Kitchen 0.7, I could test cookbooks with the technique
described in https://gist.github.com/**ingineering/4323301https://gist.github.com/ingineering/4323301.
But I think on Test Kitchen 1.0, I think this technique can not be used.

Thanks!!

--

Ryutaro YOSHIBA / Ryuzee
http://www.ryuzee.com
http://twitter.com/ryuzee

On 6/22/2013 6:26 AM, Ryutaro YOSHIBA wrote:

Thanks Jeff

I suppose [...] only I can write in run_list are the names of recipes
which are located in this cookbook.
Is it right?

Not from what I can tell. From the README.md:

suites:

  • name: stock_system_and_user
    run_list:
    • recipe[user::data_bag]
    • recipe[rvm::system]
    • recipe[rvm::user]
      attributes:
      users:
    • wigglebottom
      rvm:
      user_installs:
      - user: wigglebottom
      default_ruby: 1.8.7

Note the 2 different cookboks user and rvm.