Skip to content

Commit

Permalink
convert test kitchen support to v1.0alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimberman committed May 28, 2013
1 parent 6d83813 commit eb9af8d
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 52 deletions.
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
.vagrant
Berksfile.lock
Gemfile.lock
*~
*#
.#*
\#*#
.*.sw[a-z]
*.un~
.bundle
.cache
.kitchen
bin
Gemfile.lock
.kitchen.local.yml
40 changes: 40 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
driver_plugin: vagrant
driver_config:
require_chef_omnibus: true

platforms:
- name: ubuntu-12.04
driver_config:
box: opscode-ubuntu-12.04
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box
run_list:
- recipe[apt]

- name: ubuntu-10.04
driver_config:
box: opscode-ubuntu-10.04
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_provisionerless.box
run_list:
- recipe[apt]

- name: centos-6.4
driver_config:
box: opscode-centos-6.4
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box

- name: centos-5.9
driver_config:
box: opscode-centos-5.9
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-5.9_provisionerless.box

suites:
- name: default
run_list:
- recipe[git]
attributes: {}

- name: server
run_list:
- recipe[git::server]
attributes: {}
8 changes: 8 additions & 0 deletions Berksfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
site :opscode

metadata

group :integration do
cookbook "apt"
cookbook "yum"
end
25 changes: 25 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
This cookbook includes support for running tests via Test Kitchen (1.0). This has some requirements.

1. You must be using the Git repository, rather than the downloaded cookbook from the Chef Community Site.
2. You must have Vagrant 1.1 installed.
3. You must have a "sane" Ruby 1.9.3 environment.

Once the above requirements are met, install the additional requirements:

Install the berkshelf plugin for vagrant, and berkshelf to your local Ruby environment.

vagrant plugin install vagrant-berkshelf
gem install berkshelf

Install Test Kitchen 1.0 (unreleased yet, use the alpha / prerelease version).

gem install test-kitchen --pre

Install the Vagrant driver for Test Kitchen.

gem install kitchen-vagrant

Once the above are installed, you should be able to run Test Kitchen:

kitchen list
kitchen test
4 changes: 0 additions & 4 deletions test/kitchen/Kitchenfile

This file was deleted.

1 change: 0 additions & 1 deletion test/kitchen/cookbooks/git_test/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions test/kitchen/cookbooks/git_test/metadata.rb

This file was deleted.

20 changes: 0 additions & 20 deletions test/kitchen/cookbooks/git_test/recipes/default.rb

This file was deleted.

20 changes: 0 additions & 20 deletions test/kitchen/cookbooks/git_test/recipes/server.rb

This file was deleted.

0 comments on commit eb9af8d

Please sign in to comment.