Skip to content

Commit

Permalink
(FM-1907) Fix mod_negotation system tests
Browse files Browse the repository at this point in the history
Previously we were including the base apache class and then including the
'apache::mod::negotiation' class. However the apache class includes
'apache::mod::negoatiation' by default. Telling apache not to use its
default mods fixes this error.

There was also a reference to '$mod_dir' when finding the negotiation.conf
instead of just 'mod_dir'.

s/puppet code/ruby code/g fixed the issue. :)
  • Loading branch information
justinstoller committed Sep 22, 2014
1 parent 5ef11d7 commit 9bd66e0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/acceptance/mod_negotiation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
context "default negotiation config" do
it 'succeeds in puppeting negotiation' do
pp= <<-EOS
class { '::apache': }
class { '::apache': default_mods => false }
class { '::apache::mod::negotiation': }
EOS
apply_manifest(pp, :catch_failures => true)
end

describe file("#{$mod_dir}/negotiation.conf") do
describe file("#{mod_dir}/negotiation.conf") do
it { should contain "LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
ForceLanguagePriority Prefer Fallback" }
end
Expand All @@ -39,15 +39,15 @@ class { '::apache::mod::negotiation': }
context "with alternative force_language_priority" do
it 'succeeds in puppeting negotiation' do
pp= <<-EOS
class { '::apache': }
class { '::apache': default_mods => false }
class { '::apache::mod::negotiation':
force_language_priority => 'Prefer',
}
EOS
apply_manifest(pp, :catch_failures => true)
end

describe file("#{$mod_dir}/negotiation.conf") do
describe file("#{mod_dir}/negotiation.conf") do
it { should contain "ForceLanguagePriority Prefer" }
end

Expand All @@ -60,15 +60,15 @@ class { '::apache::mod::negotiation':
context "with alternative language_priority" do
it 'succeeds in puppeting negotiation' do
pp= <<-EOS
class { '::apache': }
class { '::apache': default_mods => false }
class { '::apache::mod::negotiation':
language_priority => [ 'en', 'es' ],
}
EOS
apply_manifest(pp, :catch_failures => true)
end

describe file("#{$mod_dir}/negotiation.conf") do
describe file("#{mod_dir}/negotiation.conf") do
it { should contain "LanguagePriority en es" }
end

Expand Down

0 comments on commit 9bd66e0

Please sign in to comment.