More test logic fixes for SLES 10
authorJonathan Tripathy <jt@puppetlabs.com>
Fri, 24 Jul 2015 10:28:35 +0000 (11:28 +0100)
committerJonathan Tripathy <jt@puppetlabs.com>
Fri, 24 Jul 2015 10:34:08 +0000 (11:34 +0100)
spec/acceptance/firewall_spec.rb
spec/acceptance/invert_spec.rb

index aa888dc294baa7e54fdb189f5befcea442a3254e..4b3a438873d89d0ed13090ddd35e685276e2c759 100644 (file)
@@ -2217,7 +2217,7 @@ describe 'firewall type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfami
 
       it 'should contain the rule' do
         shell('iptables-save') do |r|
-          if (fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') == '5') or default['platform'] =~ /sles-10/
+          if (fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') == '5') or (default['platform'] =~ /sles-10/)
             expect(r.stdout).to match(/-A INPUT -s 10.1.5.28 -p tcp -m mac --mac-source 0A:1B:3C:4D:5E:6F -m comment --comment "610 - test"/)
           else
             expect(r.stdout).to match(/-A INPUT -s 10.1.5.28\/(32|255\.255\.255\.255) -p tcp -m mac --mac-source 0A:1B:3C:4D:5E:6F -m comment --comment "610 - test"/)
index 1c5790bb2a92d7402cb67ca9654c1f14df385482..07d698a66f4f18bf1b6d01333e3179a24c0d58a5 100644 (file)
@@ -30,7 +30,7 @@ describe 'firewall type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfami
 
     it 'should contain the rules' do
       shell('iptables-save') do |r|
-        if (fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') == '5') or (fact('osfamily') == 'SLES' and fact('operatingsystemmajrelease') == '10')
+        if (fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') == '5') or (default['platform'] =~ /sles-10/)
           expect(r.stdout).to match(/-A INPUT -p ! esp -m comment --comment "601 disallow esp protocol" -j ACCEPT/)
           expect(r.stdout).to match(/-A INPUT -s ! 10\.0\.0\.0\/255\.0\.0\.0 -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m multiport --sports ! 80,443 -m comment --comment "602 drop NEW external website packets with FIN\/RST\/ACK set and SYN unset" -m state --state NEW -j DROP/)
         else