0

I have few recipes and I want to test them using kitchen.

I am new to kitchen and I was going through their docs which is really good.

---
driver:
  name: ssh

provisioner:
  name: chef_solo

platforms:
  - name: ubuntu-14.04
    driver:
      hostname: 123.456.789.10
      username: root
      password: blahblah

suites:
  - name: default
    run_list:
      - recipe[redis::default]     
    attributes:

I have a lot of cookbooks ,

Lvl1 Main Folder
Lvl2|--> kitchen init
    |-->cookbook 
Lvl3   |--> A
          |--> recipes 
       |--> B
          |--> recipes

So basically I have way too many recipes inside a main cookbook folder. Is it possible to run kitchen test on level 1 itself by mentioning it under run_list somehow? Hope I am clear.

I basically want to test it on a higher level since by cookbooks are all interdependent.

druuu
  • 1,676
  • 6
  • 19
  • 36
  • I hope you get my question. :-) – druuu Sep 28 '14 at 17:02
  • hey I have one question for you, regarding to this. I have a very similar .kitchen.yml file, that is using SSH as a driver. So my question is, have you faced an error when you try to converge saying something like "Message: Could not load the 'ssh' driver from the load path." – DavidSilveira Oct 17 '14 at 18:52
  • You need to install the 'ssh' driver provided. I hope you `gem install kitchen-ssh` . It should work now. Let me know :) – druuu Oct 19 '14 at 06:36
  • hey! thank you so much for your answer! unfortunately I did that but didn't worked... so I took another solution... remove the project and clone the repo from scratch, ran bundle install again, berks install and so on... fortunately this time worked, so I assume that was more related with an environment issue rather than a kitchen problem. – DavidSilveira Oct 20 '14 at 14:47

1 Answers1

1

Yes, just make a Berksfile that looks like:

cookbook 'A', path: 'A'
cookbook 'B', path: 'B'

In the base folder next to your .kitchen.yml. Then you can make a suite like:

- name: A
  run_list:
  - recipe[A]

or:

- name: both
  run_list:
  - recipe[A]
  - recipe[B]
coderanger
  • 52,400
  • 4
  • 52
  • 75