Skip to content

Commit

Permalink
Merge pull request #351 from ptomulik/itk_redhat
Browse files Browse the repository at this point in the history
Fixed failing itk system spec on RedHat
  • Loading branch information
hunner committed Sep 5, 2013
2 parents 3ee49eb + bd40b3b commit 30058cc
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions spec/system/itk_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,35 @@

case node.facts['osfamily']
when 'Debian'
servicename = 'apache2'
service_name = 'apache2'
else
raise Error, "Unconfigured OS for apache service on #{node.facts['osfamily']}"
# Not implemented yet
service_name = :skip
end

describe 'apache::mod::itk class' do
describe 'running puppet code' do
# Using puppet_apply as a helper
it 'should work with no errors' do
pp = <<-EOS
class { 'apache':
mpm_module => 'itk',
}
EOS
unless service_name.equal? :skip
describe 'apache::mod::itk class' do
describe 'running puppet code' do
# Using puppet_apply as a helper
it 'should work with no errors' do
pp = <<-EOS
class { 'apache':
mpm_module => 'itk',
}
EOS

# Run it twice and test for idempotency
puppet_apply(pp) do |r|
r.exit_code.should_not == 1
r.refresh
r.exit_code.should be_zero
# Run it twice and test for idempotency
puppet_apply(pp) do |r|
r.exit_code.should_not == 1
r.refresh
r.exit_code.should be_zero
end
end
end
end

describe service(servicename) do
it { should be_running }
it { should be_enabled }
describe service(service_name) do
it { should be_running }
it { should be_enabled }
end
end
end

0 comments on commit 30058cc

Please sign in to comment.