From: Jonathan Tripathy Date: Wed, 22 Jul 2015 18:21:23 +0000 (+0100) Subject: Exclude SLES 10 from some tests X-Git-Tag: 1.7.0~4^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=d0e2dd7b04c345190226200ebab3794e721eb23b;p=puppet-modules%2Fpuppetlabs-firewall.git Exclude SLES 10 from some tests --- diff --git a/spec/acceptance/connlimit_spec.rb b/spec/acceptance/connlimit_spec.rb index 5240208..8fff329 100644 --- a/spec/acceptance/connlimit_spec.rb +++ b/spec/acceptance/connlimit_spec.rb @@ -11,52 +11,54 @@ describe 'firewall type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfami end end - describe 'connlimit_above' do - context '10' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '500 - test': - proto => tcp, - dport => '2222', - connlimit_above => '10', - action => reject, - } - EOS + if default['platform'] !~ /sles-10/ + describe 'connlimit_above' do + context '10' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '500 - test': + proto => tcp, + dport => '2222', + connlimit_above => '10', + action => reject, + } + EOS - apply_manifest(pp, :catch_failures => true) - end + apply_manifest(pp, :catch_failures => true) + end - it 'should contain the rule' do - shell('iptables-save') do |r| - #connlimit-saddr is added in Ubuntu 14.04. - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --dports 2222 -m comment --comment "500 - test" -m connlimit --connlimit-above 10 --connlimit-mask 32 (--connlimit-saddr )?-j REJECT --reject-with icmp-port-unreachable/) + it 'should contain the rule' do + shell('iptables-save') do |r| + #connlimit-saddr is added in Ubuntu 14.04. + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --dports 2222 -m comment --comment "500 - test" -m connlimit --connlimit-above 10 --connlimit-mask 32 (--connlimit-saddr )?-j REJECT --reject-with icmp-port-unreachable/) + end end end end - end - describe 'connlimit_mask' do - context '24' do - it 'applies' do - pp = <<-EOS - class { '::firewall': } - firewall { '501 - test': - proto => tcp, - dport => '2222', - connlimit_above => '10', - connlimit_mask => '24', - action => reject, - } - EOS + describe 'connlimit_mask' do + context '24' do + it 'applies' do + pp = <<-EOS + class { '::firewall': } + firewall { '501 - test': + proto => tcp, + dport => '2222', + connlimit_above => '10', + connlimit_mask => '24', + action => reject, + } + EOS - apply_manifest(pp, :catch_failures => true) - end + apply_manifest(pp, :catch_failures => true) + end - it 'should contain the rule' do - shell('iptables-save') do |r| - #connlimit-saddr is added in Ubuntu 14.04. - expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --dports 2222 -m comment --comment "501 - test" -m connlimit --connlimit-above 10 --connlimit-mask 24 (--connlimit-saddr )?-j REJECT --reject-with icmp-port-unreachable/) + it 'should contain the rule' do + shell('iptables-save') do |r| + #connlimit-saddr is added in Ubuntu 14.04. + expect(r.stdout).to match(/-A INPUT -p tcp -m multiport --dports 2222 -m comment --comment "501 - test" -m connlimit --connlimit-above 10 --connlimit-mask 24 (--connlimit-saddr )?-j REJECT --reject-with icmp-port-unreachable/) + end end end end diff --git a/spec/acceptance/firewall_bridging_spec.rb b/spec/acceptance/firewall_bridging_spec.rb index 6b48f24..487f151 100644 --- a/spec/acceptance/firewall_bridging_spec.rb +++ b/spec/acceptance/firewall_bridging_spec.rb @@ -188,7 +188,7 @@ describe 'firewall type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfami end #iptables version 1.3.5 is not suppored by the ip6tables provider - if default['platform'] !~ /el-5/ + if default['platform'] !~ /el-5/ and default['platform'] !~ /sles-10/ describe 'ip6tables physdev tests' do context 'physdev_in eth0' do it 'applies' do diff --git a/spec/acceptance/firewall_dscp_spec.rb b/spec/acceptance/firewall_dscp_spec.rb index bbb68ef..a85100a 100644 --- a/spec/acceptance/firewall_dscp_spec.rb +++ b/spec/acceptance/firewall_dscp_spec.rb @@ -59,7 +59,7 @@ describe 'firewall type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfami end end - if default['platform'] !~ /el-5/ + if default['platform'] !~ /el-5/ and default['platform'] !~ /sles-10/ describe 'dscp ipv6 tests' do context 'set_dscp 0x01' do it 'applies' do diff --git a/spec/acceptance/firewall_spec.rb b/spec/acceptance/firewall_spec.rb index 7c4cee6..8ae9b12 100644 --- a/spec/acceptance/firewall_spec.rb +++ b/spec/acceptance/firewall_spec.rb @@ -957,7 +957,7 @@ describe 'firewall type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfami end #iptables version 1.3.5 is not suppored by the ip6tables provider - if default['platform'] !~ /el-5/ + if default['platform'] !~ /el-5/ and default['platform'] !~ /sles-10/ describe 'hop_limit' do context '5' do it 'applies' do @@ -1801,7 +1801,7 @@ describe 'firewall type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfami end #iptables version 1.3.5 does not support masks on MARK rules - if default['platform'] !~ /el-5/ + if default['platform'] !~ /el-5/ or default['platform'] !~ /sles-10/ describe 'set_mark' do context '0x3e8/0xffffffff' do it 'applies' do