From 9bd66e088e5bfeb1c0b690ae4b2500bf3dd0b5e6 Mon Sep 17 00:00:00 2001 From: Justin Stoller Date: Mon, 22 Sep 2014 13:50:26 -0700 Subject: [PATCH] (FM-1907) Fix mod_negotation system tests 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. :) --- spec/acceptance/mod_negotiation_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/acceptance/mod_negotiation_spec.rb b/spec/acceptance/mod_negotiation_spec.rb index 33dcdd982..25e4acbea 100644 --- a/spec/acceptance/mod_negotiation_spec.rb +++ b/spec/acceptance/mod_negotiation_spec.rb @@ -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 @@ -39,7 +39,7 @@ 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', } @@ -47,7 +47,7 @@ class { '::apache::mod::negotiation': 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 @@ -60,7 +60,7 @@ 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' ], } @@ -68,7 +68,7 @@ class { '::apache::mod::negotiation': 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