Commit ba12eddc authored by Sean OMeara's avatar Sean OMeara
Browse files

updating test harness

parent 9c7d1fe9
.kitchen
.vagrant
Berksfile.lock
Gemfile.lock
vendor/
*~
*#
.#*
\#*#
.*.sw[a-z]
*.un~
.bundle
.cache
.kitchen
bin
.kitchen.local.yml
.coverage
\ No newline at end of file
---
driver_plugin: vagrant
driver_plugin: digitalocean
driver_config:
digitalocean_client_id: <%= ENV['DIGITAL_OCEAN_CLIENT_ID'] %>
digitalocean_api_key: <%= ENV['DIGITAL_OCEAN_API_KEY'] %>
aws_access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
aws_secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
aws_ssh_key_id: <%= ENV['AWS_KEYPAIR_NAME'] %>
ssh_key: <%= ENV['AWS_PRIVATE_KEY_PATH'] %>
rackspace_username: <%= ENV['RACKSPACE_USERNAME'] %>
rackspace_api_key: <%= ENV['RACKSPACE_API_KEY'] %>
require_chef_omnibus: latest
platforms:
# - name: omnios-r151006c
# driver_plugin: ec2
# driver_config:
# image_id: ami-35eb835c
# username: root
- name: centos-5.8
driver_plugin: digitalocean
driver_config:
image_id: 1601
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
- name: centos-6.4
driver_plugin: digitalocean
driver_config:
image_id: 562354
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
# - name: amazon-2013.09
# driver_plugin: ec2
# driver_config:
# image_id: ami-3be4bc52
# username: ec2-user
- name: ubuntu-1004
driver_plugin: digitalocean
driver_config:
image_id: 14097
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
run_list:
- recipe[apt]
- name: ubuntu-1204
driver_plugin: digitalocean
driver_config:
image_id: 1505447
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
run_list:
- recipe[apt]
suites:
- name: default
run_list:
- recipe[rsyslog::default]
- name: relp
run_list:
- recipe[rsyslog::default]
attributes:
rsyslog:
use_relp: true
# CentOS and OmniOS do not support relp
excludes:
- centos-5.8
- omnios-r151006c
- name: client
run_list:
- recipe[rsyslog::client]
attributes:
rsyslog:
server_ip: 10.0.0.50
- name: server
run_list:
- recipe[rsyslog::server]
\ No newline at end of file
---
driver_config:
digitalocean_client_id: <%= ENV['DIGITAL_OCEAN_CLIENT_ID'] %>
digitalocean_api_key: <%= ENV['DIGITAL_OCEAN_API_KEY'] %>
aws_access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
aws_secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
aws_ssh_key_id: <%= ENV['AWS_KEYPAIR_NAME'] %>
provisioner:
name: chef_zero
require_chef_omnibus: latest
platforms:
- name: centos-5.8
driver_plugin: digitalocean
driver_config:
image_id: 1601
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
ssh_key: <%= ENV['DIGITAL_OCEAN_SSH_KEY_PATH'] %>
- name: centos-6.4
driver_plugin: digitalocean
driver_config:
image_id: 562354
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
ssh_key: <%= ENV['DIGITAL_OCEAN_SSH_KEY_PATH'] %>
# - name: amazon-2013.09
# driver_plugin: ec2
# driver_config:
# image_id: ami-3be4bc52
# username: ec2-user
# ssh_key: <%= ENV['EC2_SSH_KEY_PATH'] %>
- name: fedora-19
driver_plugin: digitalocean
driver_config:
image_id: 696598
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
ssh_key: <%= ENV['DIGITAL_OCEAN_SSH_KEY_PATH'] %>
- name: ubuntu-1004
driver_plugin: digitalocean
driver_config:
image_id: 14097
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
ssh_key: <%= ENV['DIGITAL_OCEAN_SSH_KEY_PATH'] %>
run_list:
- recipe[apt]
- name: ubuntu-1204
driver_plugin: digitalocean
driver_config:
image_id: 1505447
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
ssh_key: <%= ENV['DIGITAL_OCEAN_SSH_KEY_PATH'] %>
run_list:
- recipe[apt]
suites:
- name: default
run_list:
- recipe[rsyslog::default]
- name: relp
run_list:
- recipe[rsyslog::default]
attributes:
rsyslog:
use_relp: true
# CentOS and OmniOS do not support relp
excludes:
- centos-5.8
- omnios-r151006c
- name: client
run_list:
- recipe[rsyslog::client]
attributes:
rsyslog:
server_ip: 10.0.0.50
- name: server
run_list:
- recipe[rsyslog::server]
---
driver_plugin: vagrant
driver_plugin: digitalocean
driver_config:
digitalocean_client_id: <%= ENV['DIGITAL_OCEAN_CLIENT_ID'] %>
digitalocean_api_key: <%= ENV['DIGITAL_OCEAN_API_KEY'] %>
aws_access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
aws_secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
aws_ssh_key_id: <%= ENV['AWS_KEYPAIR_NAME'] %>
ssh_key: <%= ENV['AWS_PRIVATE_KEY_PATH'] %>
rackspace_username: <%= ENV['RACKSPACE_USERNAME'] %>
rackspace_api_key: <%= ENV['RACKSPACE_API_KEY'] %>
require_chef_omnibus: latest
driver:
name: vagrant
platforms:
# - name: omnios-r151006c
# driver_plugin: ec2
# driver_config:
# image_id: ami-35eb835c
# username: root
- name: centos-5.8
driver_plugin: digitalocean
driver_config:
image_id: 1601
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
- name: centos-6.4
driver_plugin: digitalocean
driver_config:
image_id: 562354
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
provisioner:
name: chef_zero
# - name: amazon-2013.09
# driver_plugin: ec2
# driver_config:
# image_id: ami-3be4bc52
# username: ec2-user
- name: ubuntu-1004
driver_plugin: digitalocean
driver_config:
image_id: 14097
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
run_list:
- recipe[apt]
- name: ubuntu-1204
driver_plugin: digitalocean
driver_config:
image_id: 1505447
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
run_list:
- recipe[apt]
platforms:
- name: centos-5.10
- name: centos-6.5
- name: fedora-19
suites:
- name: default
......@@ -83,4 +31,4 @@ suites:
server_ip: 10.0.0.50
- name: server
run_list:
- recipe[rsyslog::server]
\ No newline at end of file
- recipe[rsyslog::server]
language: ruby
bundler_args: --without kitchen_vagrant --without development
rvm:
- 1.9.3
- 2.0.0
before_script:
- bundle exec berks install
- 2.1.0
before_install:
- echo -n $DO_KEY_CHUNK_{0..30} >> ~/.ssh/id_do.base64
- cat ~/.ssh/id_do.base64 | tr -d ' ' | base64 --decode > ~/.ssh/id_do.pem
- echo -n $EC2_KEY_CHUNK_{0..30} >> ~/.ssh/id_ec2.base64
- cat ~/.ssh/id_ec2.base64 | tr -d ' ' | base64 --decode > ~/.ssh/id_ec2.pem
script:
- bundle exec foodcritic -f any --tags ~FC023 .
# - bundle exec rspec --color --format progress
- bundle exec rubocop
- bundle exec rake travis
after_script:
- bundle exec kitchen destroy
env:
global:
- secure: VTMb359XIsFfszhrq1znF2ANHITta2gyrOloF5GXEColSH1+XB1XikcTyTVeeloHLcLAjmID2LZSbTrhfXu7gT25uKk6AKFCYFo47kIqbvjR/2hChxsZPZJLspEOKl2HyPZvA8QGBJxbTVOVXs46wt1kOui8Hqr3nLbYlKRxnjs=
- secure: bLz73tc0pbS3htWCk6O3dxMfAxQys7RCwvXtc+z9vyLry+nXmHMNBj2ir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Omco2I5vyBv4qKElsID8CY=
- secure: JWEwbpLg/4KevMApf+z6URboREh56AU5oqZQ7pS9JQG6MffNp1HTcu4R+rxvhM2g28kE/gSxJaEo+pgPCpsggycRC0/ZH2TDOl+WwiPRCjEhqYKkoEDxx4Ot5OP0jwahMTGT/33ihWlnl5DrgjAmvpbSlJsULGV97nYg0llDXb0=
- secure: WUDHKVsOgBFkxNOtifMT3jNOPfR8D7DpyFBWCjwrdIU6DLDFg92/2a7tq1CGCk7uWYUJFgdbCLnJPA304L6AzWKcycvZvgDKzkcmz0iNxpGMOfQPM57UeqQAYpgv+/4wnHzbn85ZXh2gzPsEBvJWaNjE2VftedKkqDXHe5Dg9L0=
- secure: eYgi6mgnI4qkcgi4c7vkR1vaZPcY67U4PeYVcJ0g3Ri1gP0l73D44M6QGpnUrmTdkULjj6ZVOWq2d6i+D8bLGN5R5kj90GzxVhxstVG86ZT7ottipvKez5G7cm1udDzXEK463EX+w4ITTY4Zp4tCS00o4ce+kxR/3ntiGBUYR2Y=
- secure: HOd08Pxhi4thM6PpyIk1PcFsjHKFziWT1VNaC+hhT2p0YIaEeOIL94OcrmYC9cm+Nv4Mns+QNwqazHUc8xyciYo7yVxGPVSxu+qc1GSXtnbEC3KCxjBoae2VEWaVJgZyv3Z525jHXdPKvURMA/+MF39ALRpReUiByi4Q2+rHoBg=
source 'https://rubygems.org'
gem 'berkshelf', '~> 2.0'
gem 'chefspec', '~> 3.0'
gem 'foodcritic', '~> 3.0'
gem 'rubocop'
group :lint do
gem 'foodcritic', '~> 3.0'
gem 'rubocop', '~> 0.18'
gem 'rainbow', '< 2.0'
gem 'rake'
end
group :unit do
gem 'berkshelf', '~> 3.0.0.beta6'
gem 'chefspec', '~> 3.1'
end
group :kitchen_common do
gem 'test-kitchen', '~> 1.2'
end
group :integration do
gem 'test-kitchen', '~> 1.0'
group :kitchen_vagrant do
gem 'kitchen-vagrant', '~> 0.11'
end
group :kitchen_cloud do
gem 'kitchen-digitalocean'
gem 'kitchen-ec2'
end
group :development do
gem 'ruby_gntp'
gem 'growl'
gem 'rb-fsevent'
gem 'guard', '~> 2.4'
gem 'guard-kitchen'
gem 'guard-foodcritic'
gem 'guard-rspec'
gem 'guard-rubocop'
end
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
# guard 'kitchen' do
# watch(%r{test/.+})
# watch(%r{^recipes/(.+)\.rb$})
# watch(%r{^attributes/(.+)\.rb$})
# watch(%r{^files/(.+)})
# watch(%r{^templates/(.+)})
# watch(%r{^providers/(.+)\.rb})
# watch(%r{^resources/(.+)\.rb})
# end
guard 'foodcritic', cookbook_paths: '.', all_on_start: false do
watch(%r{attributes/.+\.rb$})
watch(%r{providers/.+\.rb$})
watch(%r{recipes/.+\.rb$})
watch(%r{resources/.+\.rb$})
watch('metadata.rb')
end
guard 'rubocop', all_on_start: false do
watch(%r{attributes/.+\.rb$})
watch(%r{providers/.+\.rb$})
watch(%r{recipes/.+\.rb$})
watch(%r{resources/.+\.rb$})
watch('metadata.rb')
end
guard :rspec, cmd: 'bundle exec rspec', all_on_start: false, notification: false do
watch(%r{^libraries/(.+)\.rb$})
watch(%r{^spec/(.+)_spec\.rb$})
watch(%r{^(recipes)/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { 'spec' }
end
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
require 'foodcritic'
require 'kitchen'
# Style tests. Rubocop and Foodcritic
namespace :style do
desc 'Run Ruby style checks'
Rubocop::RakeTask.new(:ruby)
desc 'Run Chef style checks'
FoodCritic::Rake::LintTask.new(:chef) do |t|
t.options = {
fail_tags: ['any'],
tags: ['~FC005']
}
end
end
desc 'Run all style checks'
task style: ['style:chef', 'style:ruby']
# # Rspec and ChefSpec
# desc "Run ChefSpec examples"
# RSpec::Core::RakeTask.new(:spec)
# Integration tests. Kitchen.ci
namespace :integration do
desc 'Run Test Kitchen with Vagrant'
task :vagrant do
Kitchen.logger = Kitchen.default_file_logger
Kitchen::Config.new.instances.each do |instance|
instance.test(:always)
end
end
desc 'Run Test Kitchen with cloud plugins'
task :cloud do
run_kitchen = true
if ENV['TRAVIS'] == 'true' && ENV['TRAVIS_PULL_REQUEST'] != 'false'
run_kitchen = false
end
if run_kitchen
Kitchen.logger = Kitchen.default_file_logger
@loader = Kitchen::Loader::YAML.new(project_config: './.kitchen.cloud.yml')
config = Kitchen::Config.new( loader: @loader)
config.instances.each do |instance|
instance.test(:always)
end
end
end
end
desc 'Run all tests on Travis'
#task travis: ['style', 'spec', 'integration:cloud']
task travis: ['style', 'integration:cloud']
# Default
#task default: ['style', 'spec', 'integration:vagrant']
task default: ['style', 'integration:vagrant']
This cookbook uses a variety of testing components:
- Unit tests: [ChefSpec](https://github.com/acrmp/chefspec)
- Integration tests: [Test Kitchen](https://github.com/opscode/test-kitchen)
- Chef Style lints: [Foodcritic](https://github.com/acrmp/foodcritic)
- Ruby Style lints: [Rubocop](https://github.com/bbatsov/rubocop)
Prerequisites
TESTING doc
========================
Bundler
-------
A ruby environment with Bundler installed is a prerequisite for using
the testing harness shipped with this cookbook. At the time of this
writing, it works with Ruby 2.0 and Bundler 1.5.3. All programs
involved, with the exception of Vagrant, can be installed by cd'ing
into the parent directory of this cookbook and running "bundle install"
Rakefile
--------
The Rakefile ships with a number of tasks, each of which can be ran
individually, or in groups. Typing "rake" by itself will perform style
checks with Rubocop and Foodcritic, ChefSpec with rspec, and
integration with Test Kitchen using the Vagrant driver by
default.Alternatively, integration tests can be ran with Test Kitchen
cloud drivers.
```
$ rake -T
rake integration:cloud # Run Test Kitchen with cloud plugins
rake integration:vagrant # Run Test Kitchen with Vagrant
rake spec # Run ChefSpec examples
rake style # Run all style checks
rake style:chef # Lint Chef cookbooks
rake style:ruby # Run Ruby style checks
rake travis # Run all tests on Travis
```
Style Testing
-------------
To develop on this cookbook, you must have a sane Ruby 1.9+ environment. Given the nature of this installation process (and it's variance across multiple operating systems), we will leave this installation process to the user.
You must also have `bundler` installed:
$ gem install bundler
You must also have Vagrant and VirtualBox installed:
- [Vagrant](https://vagrantup.com)
- [VirtualBox](https://virtualbox.org)
Once installed, you must install the `vagrant-berkshelf` plugin:
$ vagrant plugin install vagrant-berkshelf
Development
-----------
1. Clone the git repository from GitHub:
$ git clone git@github.com:opscode-cookbooks/COOKBOOK.git
2. Install the dependencies using bundler:
$ bundle install
3. Create a branch for your changes:
$ git checkout -b my_bug_fix
4. Make any changes
5. Write tests to support those changes. It is highly recommended you write both unit and integration tests.
6. Run the tests:
- `bundle exec rspec`
- `bundle exec foodcritic .`
- `bundle exec rubocop`
- `bundle exec kitchen test`
7. Assuming the tests pass, open a Pull Request on GitHub
8. Open a JIRA ticket for this compontent, linking the JIRA ticket to the Pull Request and visa versa.
9. Mark the JIRA ticket as "Fix Provided"
For more information, see [Opscode's Contribution Guidelines](https://wiki.opscode.com/display/chef/How+to+Contribute).
Testing OmniOS
--------------
This patch to test-kitchen is required to test using the OmniOS box,
as the path to `pkgadd` (`/usr/sbin`) is not in the default `vagrant`
user's path when logging in without a TTY.
https://github.com/opscode/test-kitchen/pull/164
If your local version of Vagrant is 1.2.0 or higher, you may need to
install the `vagrant-guest-omnios` plugin to get OS detection for
OmniOS to work properly.
https://github.com/clintoncwolfe/vagrant-guest-omnios
TL;DR:
vagrant plugin install vagrant-guest-omnios
The Solaris package which is installed on OmniOS does not create
symlinks in `/usr/bin` for the various Chef binaries.
Ruby style tests can be performed by Rubocop by issuing either
```
bundle exec rubocop
```
or
```
rake style:ruby
```
Chef style tests can be performed with Foodcritic by issuing either
```
bundle exec foodcritic
```
or
```
rake style:chef
```
Spec Testing
-------------
Unit testing is done by running Rspec examples. Rspec will test any
libraries, then test recipes using ChefSpec. This works by compiling a
recipe (but not converging it), and allowing the user to make
assertions about the resource_collection.
Integration Testing
-------------------
Integration testing is performed by Test Kitchen. Test Kitchen will
use either the Vagrant driver or various cloud drivers to instantiate