Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
biemond committed May 4, 2015
1 parent 7a2a089 commit 58418fb
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ pkg
.vagrant

spec/fixtures/*

spec/reports/*
coverage/*
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ before_install:
script:
- bundle exec rake syntax
- bundle exec rake lint
- bundle exec rake ci:setup:rspec spec
- bundle exec rake spec
notifications:
email:
- [email protected]
env:
- PUPPET_VERSION=3.3.2
- PUPPET_VERSION=3.4.3
- PUPPET_VERSION=3.6.2
- PUPPET_VERSION=3.7.5
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 3.0']
puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['= 3.7.5']

platform :ruby_19, :ruby_20 do
gem 'coveralls', :require => false
Expand All @@ -13,7 +13,7 @@ gem 'rspec-system-puppet'
gem 'puppetlabs_spec_helper'
gem 'puppet-syntax'
gem 'facter', '>= 1.6.10'
gem 'ci_reporter_rspec'
# gem 'ci_reporter_rspec'
gem 'rubocop', :git => 'https://github.com/bbatsov/rubocop', :require => false
gem 'puppet-blacksmith'
gem 'fog', '>= 1.25.0'
Expand Down
34 changes: 5 additions & 29 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'puppet-syntax/tasks/puppet-syntax'
require 'pathname'
require 'ci/reporter/rake/rspec'
# require 'ci/reporter/rake/rspec'
require 'puppet_blacksmith/rake_tasks'
require 'rake'
require 'rspec/core/rake_task'

desc "Run acceptance tests"
RSpec::Core::RakeTask.new(:acceptance) do |t|
Expand All @@ -18,37 +20,9 @@ RSpec::Core::RakeTask.new(:test) do |t|
end

PuppetLint.configuration.send("disable_80chars")
# PuppetLint.configuration.send("disable_right_to_left_relationship")
# PuppetLint.configuration.send("disable_autoloader_layout")
# PuppetLint.configuration.send("disable_names_containing_dash")
PuppetLint.configuration.send("disable_class_inherits_from_params_class")
# PuppetLint.configuration.send("disable_parameter_order")
# PuppetLint.configuration.send("disable_inherits_across_namespaces")
# PuppetLint.configuration.send("disable_nested_classes_or_defines")
PuppetLint.configuration.send("disable_variable_scope")
# PuppetLint.configuration.send("disable_slash_comments")
# PuppetLint.configuration.send("disable_star_comments")
# PuppetLint.configuration.send("disable_selector_inside_resource")
PuppetLint.configuration.send("disable_case_without_default")
# PuppetLint.configuration.send("disable_documentation")
# PuppetLint.configuration.send("disable_double_quoted_strings")
# PuppetLint.configuration.send("disable_only_variable_string")
# PuppetLint.configuration.send("disable_variables_not_enclosed")
# PuppetLint.configuration.send("disable_single_quote_string_with_variables")
# PuppetLint.configuration.send("disable_quoted_booleans")
#--no-puppet_url_without_modules
# PuppetLint.configuration.send("disable_variable_contains_dash")
# PuppetLint.configuration.send("disable_hard_tabs")
# PuppetLint.configuration.send("disable_trailing_whitespace")
# PuppetLint.configuration.send("disable_2sp_soft_tabs")
# PuppetLint.configuration.send("disable_arrow_alignment")
# PuppetLint.configuration.send("disable_unquoted_resource_title")
# PuppetLint.configuration.send("disable_ensure_first_param")
# PuppetLint.configuration.send("disable_duplicate_params")
# PuppetLint.configuration.send("disable_unquoted_file_mode")
# PuppetLint.configuration.send("disable_file_mode")
# PuppetLint.configuration.send("disable_ensure_not_symlink_target")
#--no-unquoted_node_name

exclude_paths = [
"pkg/**/*",
Expand All @@ -58,6 +32,8 @@ exclude_paths = [
PuppetLint.configuration.ignore_paths = exclude_paths
PuppetSyntax.exclude_paths = exclude_paths

task :spec => :test

desc "Run syntax, lint, and spec tests."
task :default => [
:spec_prep,
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper'

describe 'wildfly' do
describe 'wildfly', :type => :class do
context 'with defaults for all parameters' do
it { should contain_class('wildfly') }
it { should contain_class('archive').that_comes_before('wildfly::prepare') }
Expand Down
16 changes: 11 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
begin
require 'coveralls'
Coveralls.wear!

rescue LoadError
puts "No Coveralls support"
end

require 'rspec-puppet'
require 'puppetlabs_spec_helper/module_spec_helper'

fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures'))

# include common helpers
support_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec/support/*.rb'))
Dir[support_path].each { |f| require f }
support_path = File.expand_path(File.join(File.dirname(__FILE__), '..','spec/support/*.rb'))
Dir[support_path].each {|f| require f}

RSpec.configure do |c|
c.config = '/doesnotexist'
Expand All @@ -17,4 +23,4 @@ def param_value(subject, type, title, param)
subject.resource(type, title).send(:parameters)[param.to_sym]
end

# at_exit { RSpec::Puppet::Coverage.report! }
at_exit { RSpec::Puppet::Coverage.report! }
3 changes: 2 additions & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ gem update --system 2.1.11

bundle exec rake syntax
bundle exec rake lint
bundle exec rake ci:setup:rspec spec
bundle exec rake spec
#bundle exec rake ci:setup:rspec spec
bundle exec rspec spec/acceptance
BEAKER_set=centos-70-x64 bundle exec rspec spec/acceptance
BEAKER_set=debian-78-x64 bundle exec rspec spec/acceptance
Expand Down

0 comments on commit 58418fb

Please sign in to comment.