From 1d854a45d426b18870ee155745eb97b448d4ea1a Mon Sep 17 00:00:00 2001 From: Ken Barber Date: Tue, 28 May 2013 15:47:24 +0100 Subject: [PATCH] Fix log test to replicate bug #182 Signed-off-by: Ken Barber --- spec/system/params_spec.rb | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/spec/system/params_spec.rb b/spec/system/params_spec.rb index 29fba22..abc0f61 100644 --- a/spec/system/params_spec.rb +++ b/spec/system/params_spec.rb @@ -77,7 +77,8 @@ firewall { '#{name}': 'proto' => 'all', 'state' => 'INVALID', 'jump' => 'LOG', - 'log_level' => 'debug', + 'log_level' => '3', + 'log_prefix' => '"IPTABLES dropped invalid: "', }) ppm2 = pp({ @@ -86,27 +87,22 @@ firewall { '#{name}': 'proto' => 'all', 'state' => 'INVALID', 'jump' => 'LOG', - 'log_level' => 'debug', + 'log_level' => '3', + 'log_prefix' => '"IPTABLES dropped invalid: "', }) puppet_apply(ppm1) do |r| - r.stderr.should == '' + r.stderr.should be_empty r.exit_code.should == 2 end - puppet_apply(ppm1) do |r| - r.stderr.should == '' - r.exit_code.should == 0 - end - - # check idempotency ppm = <<-EOS + "\n" + ppm2 resources { 'firewall': purge => true, } EOS puppet_apply(ppm) do |r| - r.stderr.should == '' + r.stderr.should be_empty r.exit_code.should == 2 end end -- 2.45.2