]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Fix logic for supported socket platforms
authorHunter Haugen <hunter@puppetlabs.com>
Fri, 21 Feb 2014 20:55:20 +0000 (12:55 -0800)
committerHunter Haugen <hunter@puppetlabs.com>
Fri, 21 Feb 2014 20:55:20 +0000 (12:55 -0800)
spec/acceptance/params_spec.rb

index 261b4770e69bc4cad970a7ecdc3f4d25d0c6e5d0..d2948eed898d15a51c552e99fb64c2bd7c94c65a 100644 (file)
@@ -20,23 +20,19 @@ firewall { '#{name}':
     pm
   end
 
-  it 'test various params' do
+  it 'test various params', :unless => default['platform'].match(/el-5/) do
     iptables_flush_all_tables
 
-    unless (fact('operatingsystem') == 'CentOS') && \
-      fact('operatingsystemrelease') =~ /^5\./ then
-
-      ppm = pp({
-        'table' => "'raw'",
-        'socket' => 'true',
-        'chain' => "'PREROUTING'",
-        'jump' => 'LOG',
-        'log_level' => 'debug',
-      })
+    ppm = pp({
+      'table' => "'raw'",
+      'socket' => 'true',
+      'chain' => "'PREROUTING'",
+      'jump' => 'LOG',
+      'log_level' => 'debug',
+    })
 
-      expect(apply_manifest(ppm, :catch_failures => true).exit_code).to eq(2)
-      expect(apply_manifest(ppm, :catch_failures => true).exit_code).to be_zero
-    end
+    expect(apply_manifest(ppm, :catch_failures => true).exit_code).to eq(2)
+    expect(apply_manifest(ppm, :catch_failures => true).exit_code).to be_zero
   end
 
   it 'test log rule' do