Skip to content

Commit

Permalink
Merge pull request #517 from jaxxstorm/fix_tests
Browse files Browse the repository at this point in the history
Fix tests
  • Loading branch information
jamtur01 authored Jul 21, 2016
2 parents 691b159 + 92ed3c8 commit f86f20f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ group :development, :unit_tests do
gem 'rspec-puppet', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', "1.0.1", :require => false
gem 'json', :require => false
gem 'json', "~> 1.8.3", :require => false
gem 'puppet-syntax', :require => false
gem 'metadata-json-lint', :require => false
gem 'puppet-blacksmith', :require => false
Expand All @@ -24,6 +24,7 @@ group :development, :unit_tests do
gem 'puppet-lint-undef_in_function-check', :require => false
gem 'puppet-lint-unquoted_string-check', :require => false
gem 'puppet-lint-version_comparison-check', :require => false

end

group :system_tests do
Expand Down
3 changes: 2 additions & 1 deletion spec/classes/sensu_enterprise_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
let(:facts) { {
:osfamily => 'RedHat',
:fqdn => 'testhost.domain.com'

} }

context 'with enterprise => true' do
Expand Down Expand Up @@ -120,7 +121,7 @@
end

context 'on Debian' do
let(:facts) { { :osfamily => 'Debian', :lsbdistid => 'ubuntu' } }
let(:facts) { { :osfamily => 'Debian', :lsbdistid => 'ubuntu', :lsbdistrelease => '14.04' } }
context 'when enterprise => true' do
let(:params) { {
:enterprise => true,
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/sensu_package_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
context 'repos' do

context 'ubuntu' do
let(:facts) { { :osfamily => 'Debian' , :lsbdistid => 'ubuntu'} }
let(:facts) { { :osfamily => 'Debian', :lsbdistid => 'ubuntu', :lsbdistrelease => '14.04'} }

context 'with puppet-apt installed' do
let(:pre_condition) { [ 'define apt::source ($ensure, $location, $release, $repos, $include, $key) {}' ] }
Expand Down
5 changes: 2 additions & 3 deletions spec/defines/sensu_handler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
:owner => 'sensu',
:group => 'sensu',
:mode => '0440'
).that_comes_before("Sensu_Handler[#{title}]")
)
end
end

Expand All @@ -38,8 +38,7 @@
it { should contain_sensu_handler('myhandler').with_ensure('absent') }
it do
should contain_file("/etc/sensu/conf.d/handlers/#{title}.json").
with_ensure('absent').
that_comes_before("Sensu_Handler[#{title}]")
with_ensure('absent')
end
end

Expand Down
8 changes: 4 additions & 4 deletions spec/defines/sensu_mutator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
:owner => 'sensu',
:group => 'sensu',
:mode => '0440'
).that_comes_before("Sensu_Mutator[#{title}]")
)
end
end

Expand All @@ -33,9 +33,9 @@
} }
it { should contain_sensu_mutator('mymutator').with_ensure('absent') }
it do
should contain_file("/etc/sensu/conf.d/mutators/#{title}.json").
with_ensure('absent').
that_comes_before("Sensu_Mutator[#{title}]")
should contain_file("/etc/sensu/conf.d/mutators/#{title}.json").with(
:ensure => 'absent'
)
end
end

Expand Down

0 comments on commit f86f20f

Please sign in to comment.