Skip to content

Commit f9ec416

Browse files
author
jtimberman
committed
Update test kitchen support
* requires vagrant 1.1+, test kitchen 1.0.0.alpha.4+ * removes test cookbook; uses .kitchen.yml suite * Add TESTING.md doc
1 parent 131be51 commit f9ec416

9 files changed

Lines changed: 70 additions & 16 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ bin
55
#*#
66
*~
77
.#*#
8+
.kitchen/
9+
.kitchen.local.yml

.kitchen.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
driver_plugin: vagrant
3+
4+
platforms:
5+
- name: ubuntu-12.04
6+
driver_config:
7+
box: canonical-ubuntu-12.04
8+
box_url: http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box
9+
require_chef_omnibus: true
10+
run_list: ["recipe[apt]"]
11+
- name: ubuntu-10.04
12+
driver_config:
13+
box: opscode-ubuntu-10.04
14+
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_chef-11.2.0.box
15+
run_list: ["recipe[apt]"]
16+
- name: centos-6.3
17+
driver_config:
18+
box: opscode-centos-6.3
19+
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.3_chef-11.2.0.box
20+
- name: centos-5.8
21+
driver_config:
22+
box: opscode-centos-5.8
23+
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-5.8_chef-11.2.0.box
24+
25+
suites:
26+
- name: openjdk
27+
run_list: ["recipe[minitest-handler]", "recipe[java]"]
28+
attributes: {}
29+
30+
- name: oracle
31+
run_list: ["recipe[minitest-handler]", "recipe[java]"]
32+
attributes:
33+
java:
34+
oracle:
35+
accept_oracle_download_terms: true
36+
install_flavor: "oracle"

Berksfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
site :opscode
2+
metadata
3+
4+
group :integration do
5+
cookbook "apt"
6+
cookbook "minitest-handler"
7+
end

Gemfile

Lines changed: 0 additions & 3 deletions
This file was deleted.

TESTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
This cookbook includes support for running tests via Test Kitchen (1.0). This has some requirements.
2+
3+
1. You must be using the Git repository, rather than the downloaded cookbook from the Chef Community Site.
4+
2. You must have Vagrant 1.1 installed.
5+
3. You must have a "sane" Ruby 1.9.3 environment.
6+
7+
Once the above requirements are met, install the additional requirements:
8+
9+
Install the berkshelf plugin for vagrant, and berkshelf to your local Ruby environment.
10+
11+
vagrant plugin install berkshelf-vagrant
12+
gem install berkshelf
13+
14+
Install Test Kitchen 1.0 (unreleased yet, use the alpha / prerelease version).
15+
16+
gem install test-kitchen --pre
17+
18+
Install the Vagrant driver for Test Kitchen.
19+
20+
gem install kitchen-vagrant
21+
22+
Once the above are installed, you should be able to run Test Kitchen:
23+
24+
kitchen list
25+
kitchen test

test/kitchen/Kitchenfile

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/kitchen/cookbooks/java_test/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/kitchen/cookbooks/java_test/metadata.rb

Lines changed: 0 additions & 6 deletions
This file was deleted.

test/kitchen/cookbooks/java_test/recipes/oracle.rb

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)