diff options
author | John Keiser <john@johnkeiser.com> | 2015-09-30 13:35:18 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2015-09-30 14:24:57 -0700 |
commit | 25bd140d724dc6f9eb3333aa9182cf7fa88aa434 (patch) | |
tree | a5b2030cc41438d14219efeb7194beb023a33054 | |
parent | e6959f4e9306a65ac52bc9087acdf4a0bccc2f59 (diff) | |
download | chef-25bd140d724dc6f9eb3333aa9182cf7fa88aa434.tar.gz |
Add cheffish, chef-zero, chef-provisioning and chef-provisioning-aws specs
-rw-r--r-- | .travis.yml | 12 | ||||
-rw-r--r-- | Gemfile | 6 | ||||
-rw-r--r-- | tasks/external_tests.rb | 26 |
3 files changed, 30 insertions, 14 deletions
diff --git a/.travis.yml b/.travis.yml index 5f616dd95d..6adae716f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,10 +26,15 @@ matrix: include: - rvm: 2.1 - rvm: 2.2 - - rvm: 2.1 + - rvm: 2.2 gemfile: pedant.gemfile script: bundle exec rake pedant - ### START TEST KITCHEN ONLY ### + - rvm: 2.2 + script: bundle exec rake cheffish_spec + - rvm: 2.2 + script: bundle exec rake chef_provisioning_spec + - rvm: 2.2 + script: bundle exec rake chef_provisioning_aws_spec - rvm: 2.2 script: bundle exec rake chefspec_spec - rvm: 2.2 @@ -45,7 +50,8 @@ matrix: # Not working yet: halite # - rvm: 2.2 # script: bundle exec rake poise_spec - - rvm: 2.1 + ### START TEST KITCHEN ONLY ### + - rvm: 2.2 gemfile: kitchen-tests/Gemfile before_install: - echo -n $DO_KEY_CHUNK_{0..30} >> ~/.ssh/id_aws.base64 @@ -22,11 +22,15 @@ group(:development, :test) do gem "simplecov" gem 'rack', "~> 1.5.1" - gem 'cheffish', "~> 1.3", "!= 1.3.1" gem 'ruby-shadow', :platforms => :ruby unless RUBY_PLATFORM.downcase.match(/(aix|cygwin)/) # For external tests + gem 'chef-zero', github: 'chef/chef-zero' + gem 'cheffish', github: 'chef/cheffish' + gem 'chef-provisioning', github: 'chef/chef-provisioning' + gem 'chef-provisioning-aws', github: 'chef/chef-provisioning-aws' + gem 'test-kitchen' gem 'chefspec' gem 'chef-sugar' gem 'poise', github: 'poise/poise', branch: 'deeecb890a6a0bc2037dfb09ce0fd0a8931519aa' diff --git a/tasks/external_tests.rb b/tasks/external_tests.rb index b87b5bf1d6..9304244424 100644 --- a/tasks/external_tests.rb +++ b/tasks/external_tests.rb @@ -1,6 +1,6 @@ require 'tempfile' -def bundle_exec_with_chef(test_gem, command) +def bundle_exec_with_chef(test_gem, commands) gem_path = Bundler.environment.specs[test_gem].first.full_gem_path gemfile_path = File.join(gem_path, 'Gemfile.chef-external-test') gemfile = File.open(gemfile_path, "w") @@ -22,7 +22,9 @@ def bundle_exec_with_chef(test_gem, command) gemfile.close Dir.chdir(gem_path) do system({ 'BUNDLE_GEMFILE' => gemfile.path, 'RUBYOPT' => nil }, "bundle install") - system({ 'BUNDLE_GEMFILE' => gemfile.path, 'RUBYOPT' => nil }, "bundle exec #{command}") + Array(commands).each do |command| + system({ 'BUNDLE_GEMFILE' => gemfile.path, 'RUBYOPT' => nil }, "bundle exec #{command}") + end end ensure File.delete(gemfile_path) @@ -30,18 +32,22 @@ def bundle_exec_with_chef(test_gem, command) end EXTERNAL_PROJECTS = { - "chef-sugar" => "rake", - "foodcritic" => "rake test", - "chefspec" => "rake", - "chef-rewind" => "rake spec", - "poise" => "rake spec", - "halite" => "rake spec" + "chef-zero" => [ "rake spec", "rake pedant" ], + "cheffish" => "rake spec", + "chef-provisioning" => "rake spec", + "chef-provisioning-aws" => "rake spec", + "chef-sugar" => "rake", + "foodcritic" => "rake test", + "chefspec" => "rake", + "chef-rewind" => "rake spec", + "poise" => "rake spec", + "halite" => "rake spec" } task :external_specs => EXTERNAL_PROJECTS.keys.map { |g| :"#{g.sub("-","_")}_spec" } -EXTERNAL_PROJECTS.each do |test_gem, command| +EXTERNAL_PROJECTS.each do |test_gem, commands| task :"#{test_gem.gsub('-','_')}_spec" do - bundle_exec_with_chef(test_gem, command) + bundle_exec_with_chef(test_gem, commands) end end |