2:56 PMtest kitchen
Getting Started Writing Chef Cookbooks the Berkshelf Way, Part 3 - Mischa Taylor's Coding Blog
Update January 7, 2014 * Note about Michel Goetz’s blog series on ChefSpec
Updated December 29, 2013
Updated September 10, 2013
Updated September 1, 2013
This is the third article in a series on writing Opscode Chef cookbooks the Berkshelf Way. Here’s a link to Part 1 and Part 2. The source code examples covered in this article can be found on Github: https://github.com/misheska/myface
In this installment, we’re going to learn how to use Test Kitchen to automate all the verification steps we did by hand for each iteration in Part 1 and Part 2. If not anything else, it’s worth learning Test Kitchen because OpsCode, the company that makes Chef, has encouraged the use of Test Kitchen to verify community cookbooks.
Test Kitchen is built on top of vagrant and supplements the Vagrantfile file you have been using so far in this series to do local automated testing. The main benefit to Test Kitchen is that it makes it easy to run tests on multiple platforms in parallel, which is more difficult to do with just a Vagrantfile. We’ll be showcasing this aspect of Test Kitchen by ensuring that Myface works on both the CentOS 6.4 and Ubuntu 12.04 Linux distributions.
Edit myface/Gemfile and add the following lines to load the Test Kitchen gems:
Depending on when you went through this article series, your Gemfile may already have these additions. After editing, your myface/Gemfile should look like the following after editing:
|Total comments: 0|