diff --git a/.gitignore b/.gitignore index fc5b76d..dd1e425 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,14 @@ +.vagrant +Berksfile.lock +Gemfile.lock +*~ +*# +.#* +\#*# +.*.sw[a-z] +*.un~ .bundle .cache .kitchen bin +.kitchen.local.yml diff --git a/.kitchen.yml b/.kitchen.yml new file mode 100644 index 0000000..a39cb06 --- /dev/null +++ b/.kitchen.yml @@ -0,0 +1,49 @@ +--- +driver_plugin: vagrant +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 + require_chef_omnibus: true + 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 + require_chef_omnibus: true + 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 + require_chef_omnibus: true +- 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 + require_chef_omnibus: true + +suites: +- name: default + run_list: + - recipe[postfix] + attributes: {} +- name: aliases + run_list: + - recipe[postfix] + attributes: {} +- name: client + run_list: + - recipe[postfix] + attributes: {} +- name: server + run_list: + - recipe[postfix] + attributes: {} +- name: sasl_auth + run_list: + - recipe[postfix] + attributes: {} diff --git a/Berksfile b/Berksfile new file mode 100644 index 0000000..34a3b2d --- /dev/null +++ b/Berksfile @@ -0,0 +1,8 @@ +site :opscode + +metadata + +group :integration do + cookbook "apt" + cookbook "yum" +end diff --git a/TESTING.md b/TESTING.md new file mode 100644 index 0000000..e29ff7c --- /dev/null +++ b/TESTING.md @@ -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 diff --git a/test/kitchen/Kitchenfile b/test/kitchen/Kitchenfile deleted file mode 100644 index f455233..0000000 --- a/test/kitchen/Kitchenfile +++ /dev/null @@ -1,7 +0,0 @@ -cookbook "postfix" do - configuration "default" - configuration "aliases" - configuration "client" - configuration "server" - configuration "sasl_auth" -end