Commit c40f790f authored by Tim Smith's avatar Tim Smith
Browse files

Fully switch over to testing with delivery local mode


Signed-off-by: default avatarTim Smith <tsmith@chef.io>
parent 566b66d2
......@@ -22,5 +22,4 @@ script:
- /opt/chefdk/embedded/bin/chef --version
- /opt/chefdk/embedded/bin/cookstyle --version
- /opt/chefdk/embedded/bin/foodcritic --version
- /opt/chefdk/bin/chef exec rake
- /opt/chefdk/bin/chef exec delivery local all
# This gemfile provides additional gems for testing and releasing this cookbook
# It is meant to be installed on top of ChefDK which provides the majority
# of the necessary gems for testing this cookbook
#
# Run 'chef exec bundle install' to install these dependencies
source 'https://rubygems.org'
gem 'cookstyle'
gem 'foodcritic'
gem 'rake'
gem 'stove'
#!/usr/bin/env rake
# Style tests. cookstyle (rubocop) and Foodcritic
namespace :style do
begin
require 'cookstyle'
require 'rubocop/rake_task'
desc 'Run Ruby style checks'
RuboCop::RakeTask.new(:ruby)
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end
begin
require 'foodcritic'
desc 'Run Chef style checks'
FoodCritic::Rake::LintTask.new(:chef) do |t|
t.options = {
fail_tags: ['any'],
}
end
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end
end
desc 'Run all style checks'
task style: ['style:chef', 'style:ruby']
# ChefSpec
begin
require 'rspec/core/rake_task'
desc 'Run ChefSpec examples'
RSpec::Core::RakeTask.new(:spec)
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end
# Integration tests. Kitchen.ci
namespace :integration do
begin
require 'kitchen/rake_tasks'
desc 'Run kitchen integration tests'
Kitchen::RakeTasks.new
rescue LoadError, StandardError => e
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end
end
namespace :maintain do
begin
require 'stove/rake_task'
Stove::RakeTask.new
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end
end
# default
task default: %w(style spec)
......@@ -32,7 +32,7 @@ build_script:
test_script:
- c:\opscode\chefdk\bin\cookstyle --version
- c:\opscode\chefdk\bin\chef.bat exec foodcritic --version
- c:\opscode\chefdk\bin\chef.bat exec rake
- c:\opscode\chefdk\bin\chef.bat exec delivery local all
- c:\opscode\chefdk\bin\chef.bat exec kitchen verify
deploy: off
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment