Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Cleanups #135

Merged
merged 7 commits into from
Feb 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,18 @@ _yardoc
doc/
.idea

#chef stuff
# chef stuff
Berksfile.lock
.kitchen
.kitchen.local.yml
vendor/
.coverage/
.zero-knife.rb
Policyfile.lock.json
Cheffile.lock
.librarian/

#vagrant stuff
# vagrant stuff
.vagrant/
.vagrant.d/
.kitchen/
67 changes: 0 additions & 67 deletions .kitchen.cloud.yml

This file was deleted.

69 changes: 0 additions & 69 deletions .kitchen.ec2.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ driver:
provisioner:
name: chef_zero
data_bags_path: test/fixtures/data_bags
deprecations_as_errors: true

platforms:
- name: centos-6.8
Expand All @@ -33,7 +34,7 @@ default: &default
suites:
- name: default
<<: *default
includes: [ 'ubuntu-12.04', 'ubuntu-14.04', 'centos-6.8', 'centos-7.3' ]
excludes: [ 'macosx-10.10', 'windows-server-2012r2-standard' ]
run_list:
<% if ENV['MIXLIB_INSTALL_GIT_REF'] %>
- recipe[test::install_git]
Expand All @@ -43,14 +44,14 @@ suites:

- name: local_package_install
<<: *default
includes: [ 'ubuntu-12.04', 'ubuntu-14.04', 'centos-6.8', 'centos-7.3' ]
excludes: [ 'macosx-10.10', 'windows-server-2012r2-standard' ]
run_list:
- recipe[test]
- recipe[test::local]

- name: chefdk
<<: *default
includes: [ 'ubuntu-12.04', 'ubuntu-14.04', 'centos-6.8', 'centos-7.3', 'macosx-10.10', 'windows-server-2012r2-standard' ]
includes: [ 'ubuntu-12.04', 'ubuntu-14.04', ubuntu-16.04', 'centos-6.8', 'centos-7.3', 'macosx-10.10', 'windows-server-2012r2-standard' ]
run_list:
<% if ENV['MIXLIB_INSTALL_GIT_REF'] %>
- recipe[test::install_git]
Expand Down
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
language: ruby
# Use Travis's cointainer based infrastructure
sudo: false

addons:
apt:
sources:
- chef-stable-precise
packages:
- chefdk

# Don't `bundle install`
# Don't `bundle install` which takes about 1.5 mins
install: echo "skip bundle install"

branches:
only:
- master

# Ensure we make ChefDK's Ruby the default
before_script:
- eval "$(/opt/chefdk/bin/chef shell-init bash)"
Expand Down
12 changes: 6 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace :style do
desc 'Run Ruby style checks'
RuboCop::RakeTask.new(:ruby)
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting style:ruby" unless ENV['CI']
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end

begin
Expand All @@ -24,8 +24,8 @@ namespace :style do
progress: true,
}
end
rescue LoadError
puts ">>> Gem load error: #{e}, omitting style:chef" unless ENV['CI']
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end
end

Expand All @@ -39,7 +39,7 @@ begin
desc 'Run ChefSpec examples'
RSpec::Core::RakeTask.new(:spec)
rescue LoadError => e
puts ">>> Gem load error: #{e}, omitting spec" unless ENV['CI']
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end

# Integration tests. Kitchen.ci
Expand All @@ -49,8 +49,8 @@ namespace :integration do

desc 'Run kitchen integration tests'
Kitchen::RakeTasks.new
rescue StandardError => e
puts ">>> Kitchen error: #{e}, omitting #{task.name}" unless ENV['CI']
rescue LoadError, StandardError => e
puts ">>> Gem load error: #{e}, omitting #{task.name}" unless ENV['CI']
end
end

Expand Down
2 changes: 1 addition & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2015-2016, Chef Software, Inc. <[email protected]>
# Copyright:: 2015-2016, Chef Software, Inc. <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion resources/ingredient_config.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Author:: Joshua Timberman <[email protected]
# Copyright (c) 2015-2016, Chef Software, Inc. <[email protected]>
# Copyright:: 2015-2016, Chef Software, Inc. <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion resources/omnibus_service.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Author:: Joshua Timberman <[email protected]
# Copyright (c) 2015-2016, Chef Software, Inc. <[email protected]>
# Copyright:: 2015-2016, Chef Software, Inc. <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion tasks/maintainers.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright:: Copyright (c) 2015-2016 Chef Software, Inc.
# Copyright:: 2015-2016, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 0 additions & 2 deletions test/fixtures/cookbooks/test/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
default['test']['push-client']['version'] = nil
default['test']['chef-server-core']['version'] = nil
default['test']['source_url'] = case node['platform_family']
when 'debian'
"https://packages.chef.io/stable/ubuntu/#{node['platform_version']}/chef-server-core_12.8.0-1_amd64.deb"
Expand Down
1 change: 0 additions & 1 deletion test/fixtures/cookbooks/test/recipes/config.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Chef Server Core
chef_ingredient 'chef-server' do
version node['test']['chef-server-core']['version']
config <<-EOS
api_fqdn "#{node['fqdn']}"
ip_version "ipv6"
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/cookbooks/test/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
sensitive true
end if platform_family?('rhel')

apt_update 'update' if node['platform_family'] == 'debian'
apt_update 'update'
2 changes: 1 addition & 1 deletion test/fixtures/cookbooks/test/recipes/install_git.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apt_update 'update' if node['platform_family'] == 'debian'
apt_update 'update'

include_recipe 'git'
1 change: 0 additions & 1 deletion test/fixtures/cookbooks/test/recipes/push.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
chef_ingredient 'push-jobs-client' do
version node['test']['push-client']['version']
action :install
end
1 change: 0 additions & 1 deletion test/fixtures/cookbooks/test/recipes/repo.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Chef Server Core
chef_ingredient 'chef-server' do
version node['test']['chef-server-core']['version']
config <<-EOS
api_fqdn "#{node['fqdn']}"
ip_version "ipv6"
Expand Down