Permalink
Browse files

Add knife cookbook test

  • Loading branch information...
1 parent a62ab79 commit 215b8260949282fab97a312c5a3f36717e8cca14 @tmatilai tmatilai committed Jan 22, 2013
Showing with 19 additions and 2 deletions.
  1. +2 −0 .chef/knife.rb
  2. +1 −0 .gitignore
  3. +3 −0 .travis.yml
  4. +2 −1 Gemfile
  5. +11 −1 Rakefile
View
@@ -0,0 +1,2 @@
+cache_type 'BasicFile'
+cache_options(:path => "#{ENV['HOME']}/.chef/checksums")
View
@@ -1,4 +1,5 @@
/.bundle/
/.vagrant
+/cookbooks/
/Berksfile.lock
/Gemfile.lock
View
@@ -3,3 +3,6 @@ rvm:
- 1.9.3
bundler_args: --without=development
+
+before_script:
+ - bundle exec rake berks
View
@@ -1,9 +1,10 @@
source :rubygems
gem 'rake'
+gem 'berkshelf', '~> 1.1'
+gem 'chef', '~> 10'
group :development do
- gem 'berkshelf'
gem 'vagrant', '~> 1.0.5'
end
View
@@ -1,7 +1,17 @@
require 'foodcritic'
-task :default => [:foodcritic]
+task :default => [:foodcritic, :knife]
FoodCritic::Rake::LintTask.new do |t|
t.options = {:fail_tags => ['correctness']}
end
+
+desc "Install Berkshelf shims"
+task :berks do
+ sh %{berks install --path ./cookbooks}
+end
+
+desc "Test cookbooks via knife"
+task :knife do
+ sh %{knife cookbook test -o cookbooks debian}
+end

0 comments on commit 215b826

Please sign in to comment.