Skip to content

Commit

Permalink
Update test-kitchen support
Browse files Browse the repository at this point in the history
* Removes the old "test cookbook" (functionality covered by suites in
  .kitchen.yml)
* requires vagrant 1.1, test kitchen 1.0.0.alpha.4
* Removes vagrantfile (now handled by kitchen-vagrant 0.7.4+)
* Add TESTING.md doc
  • Loading branch information
jtimberman committed Apr 16, 2013
1 parent 1dfa582 commit 1c6a3f5
Show file tree
Hide file tree
Showing 15 changed files with 104 additions and 150 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
.kitchen
bin
Gemfile.lock
.kitchen/
.kitchen.local.yml
70 changes: 70 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
driver_plugin: vagrant

platforms:
- name: ubuntu-12.04
driver_config:
box: canonical-ubuntu-12.04
box_url: http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box
require_chef_omnibus: true
run_list: ["recipe[apt]"]
- name: ubuntu-10.04
driver_config:
box: opscode-ubuntu-10.04
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_chef-11.2.0.box
run_list: ["recipe[apt]"]
- name: centos-6.3
driver_config:
box: opscode-centos-6.3
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.3_chef-11.2.0.box
- name: centos-5.8
driver_config:
box: opscode-centos-5.8
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-5.8_chef-11.2.0.box

suites:
- name: default
run_list:
- recipe[minitest-handler]
- recipe[postgresql]
attributes: {}
- name: contrib
run_list:
- recipe[postgresql::contrib]
attributes: {}
- name: ppa-pitti
run_list:
- recipe[minitest-handler]
- recipe[postgresql]
excludes: ["centos-5.8", "centos-6.3"]
attributes:
postgresql:
enable_pitti_ppa: true
version: "9.2"
client:
packages: ["postgresql-client-9.2", "libpq-dev"]
- name: yum-pgdg
run_list:
- recipe[minitest-handler]
- recipe[postgresql]
excludes: ["ubuntu-10.04", "ubuntu-12.04", "debian-6.0.7"]
attributes:
postgresql:
enable_pgdg_yum: true
version: "9.2"
client:
packages: ["postgresql92"]
- name: ruby
run_list:
- recipe[postgresql::ruby]
- recipe[minitest-handler]
attributes: {}
- name: server
run_list:
- recipe[postgresql::ruby]
- recipe[minitest-handler]
- recipe[postgresql::server]
attributes:
postgresql:
password:
postgres: "iloverandompasswordsbutthiswilldo"
7 changes: 7 additions & 0 deletions Berksfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
site :opscode

metadata

group :integration do
cookbook 'minitest-handler'
end
3 changes: 0 additions & 3 deletions Gemfile

This file was deleted.

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 berkshelf-vagrant
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
10 changes: 0 additions & 10 deletions test/kitchen/Kitchenfile

This file was deleted.

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

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions test/kitchen/cookbooks/postgresql_test/metadata.rb

This file was deleted.

20 changes: 0 additions & 20 deletions test/kitchen/cookbooks/postgresql_test/recipes/contrib.rb

This file was deleted.

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

This file was deleted.

This file was deleted.

20 changes: 0 additions & 20 deletions test/kitchen/cookbooks/postgresql_test/recipes/ruby.rb

This file was deleted.

22 changes: 0 additions & 22 deletions test/kitchen/cookbooks/postgresql_test/recipes/server.rb

This file was deleted.

This file was deleted.

0 comments on commit 1c6a3f5

Please sign in to comment.