Kitchen::Localhost
A Test Kitchen Driver for when you just want to run Chef on localhost.
I swear, there's a reason this driver exists! Sometimes there are cases where you want to run Test Kitchen against your CI build server (e.g. using Travis CI's Objective-C build environments to do OS X cookbook testing). This driver allows you to do everything from Kitchen instead of separately shelling out for that one special platform.
Requirements
Nothing other than a project you wish to test with Test Kitchen and an understanding that this driver will be running against your local machine. If you write a cookbook that formats a hard drive and run it with this driver, bad things will happen.
Also note that this driver's very nature makes it likely there will be problems if you try to do a Test Kitchen run with multiple suites and/or with concurrency enabled.
Installation and Setup
Add this line to your project's Gemfile:
gem 'kitchen-localhost'
...and then execute:
$ bundle install
...or install it yourself as:
$ gem install kitchen-localhost
Configuration
Just override one of the platforms in your Kitchen config to use this driver. That's it!
---
driver:
name: vagrant
provisioner:
name: chef_zero
platforms:
- name: ubuntu-14.04
- name: centos-7.0
- name: macosx-10.10
driver:
name: localhost
suites:
- name: default
run_list:
- recipe[something]
Contributing
Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:
- Fork the repo
bundle install
- Create your feature branch (
git checkout -b my-new-feature
) - Ensure your feature has tests and
rake
passes - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- Keep an eye on the PR and ensure the CI build passes
New features that have no tests and changes that cause the CI build to fail will not be merged
Authors
Created and maintained by Jonathan Hartman (j@p4nt5.com)
License
Apache 2.0 (see LICENSE)