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

Update unit tests configuration #426

Merged
merged 5 commits into from
Apr 25, 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
9 changes: 9 additions & 0 deletions .delivery/project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[local_phases]
unit = "bundle exec rspec test/spec/"
lint = 'cookstyle --display-cop-names --extra-details'
syntax = "foodcritic ."
provision = "echo skipping"
deploy = "echo skipping"
smoke = "echo skipping"
functional = "echo skipping"
cleanup = "echo skipping"
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ matrix:
include:
- script:
- bundle install
- bundle exec rake
- chef exec delivery local all
env: UNIT_AND_LINT=1

notifications:
Expand Down
8 changes: 8 additions & 0 deletions Berksfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source 'https://supermarket.chef.io'

metadata

group :integration do
cookbook 'selinux'
cookbook 'consul_spec', path: 'test/fixtures/cookbooks/consul_spec'
end
36 changes: 11 additions & 25 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
# 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 'berkshelf'
gem 'poise', '~> 2.2'
gem 'poise-service', '~> 1.0'
gem 'poise-boiler'
gem 'chef-sugar'

group :lint do
gem 'cookstyle', '~> 1.0'
gem 'rubocop'
gem 'foodcritic'
end

group :unit, :integration do
gem 'chef-dk', '~> 1.0'
gem 'chefspec'
gem 'rubyzip'
gem 'serverspec'
gem 'rb-readline'
end

group :development do
gem 'awesome_print'
gem 'stove'
end

group :doc do
gem 'yard'
end
gem 'poise-service', '~> 1.0'
gem 'rb-readline'
gem 'stove'
2 changes: 2 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@

source_url 'https://github.com/johnbellone/consul-cookbook' if respond_to?(:source_url)
issues_url 'https://github.com/johnbellone/consul-cookbook/issues' if respond_to?(:issues_url)

chef_version '>= 12.1' if respond_to?(:chef_version)
5 changes: 1 addition & 4 deletions test/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
require 'chefspec'
require 'chefspec/policyfile'
require 'chefspec/berkshelf'
require 'poise_boiler/spec_helper'
require_relative '../../libraries/helpers'

require 'codeclimate-test-reporter'
CodeClimate::TestReporter.start