From: Robert Frank Date: Tue, 3 Sep 2019 13:22:32 +0000 (+0100) Subject: Disable tests of CT target on Oracle and Suse Linux. X-Git-Tag: v2.1.0~3^2~1 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=7f19d136bcaed7f3ed65db67b8b9d404cd88af79;p=puppet-modules%2Fpuppetlabs-firewall.git Disable tests of CT target on Oracle and Suse Linux. --- diff --git a/spec/acceptance/firewall_attributes_happy_path_spec.rb b/spec/acceptance/firewall_attributes_happy_path_spec.rb index 78cc2aa..122e492 100644 --- a/spec/acceptance/firewall_attributes_happy_path_spec.rb +++ b/spec/acceptance/firewall_attributes_happy_path_spec.rb @@ -504,7 +504,8 @@ describe 'firewall attribute testing, happy path' do end end - describe 'test attributes which are not available on rh5/6', unless: (os[:family] == 'redhat' && os[:release].start_with?('5', '6')) do + describe 'test CT target attributes which are not available on some OS', unless: + (os[:family] == 'redhat' && (os[:release].start_with?('5', '6') || os[:name] == 'OracleLinux')) || (os[:family] == 'Suse') do before(:all) do pp = <<-PUPPETCODE firewall { '1100 - ct_target tests - zone': diff --git a/spec/acceptance/firewall_attributes_ipv6_happy_path_spec.rb b/spec/acceptance/firewall_attributes_ipv6_happy_path_spec.rb index a5e8a40..7b268e6 100644 --- a/spec/acceptance/firewall_attributes_ipv6_happy_path_spec.rb +++ b/spec/acceptance/firewall_attributes_ipv6_happy_path_spec.rb @@ -261,14 +261,6 @@ describe 'firewall attribute testing, happy path', unless: (os[:family] == 'redh proto => all, provider => 'ip6tables', } - firewall { '1101 - ct_target tests - zone': - proto => 'all', - zone => '4000', - jump => 'CT', - chain => 'PREROUTING', - table => 'raw', - provider => 'ip6tables', - } PUPPETCODE apply_manifest(pp, catch_failures: true) apply_manifest(pp, catch_changes: do_catch_changes) @@ -374,8 +366,28 @@ describe 'firewall attribute testing, happy path', unless: (os[:family] == 'redh expect(result.stdout).to match(regex) end end + end + + describe 'test CT target attributes which are not available on some OS', unless: + (os[:family] == 'redhat' && (os[:release].start_with?('5', '6') || os[:name] == 'OracleLinux')) || (os[:family] == 'Suse') do + before(:all) do + pp = <<-PUPPETCODE + firewall { '1100 - ct_target tests - zone': + proto => 'all', + zone => '4000', + jump => 'CT', + chain => 'PREROUTING', + table => 'raw', + } + PUPPETCODE + apply_manifest(pp, catch_failures: true) + apply_manifest(pp, catch_changes: do_catch_changes) + end + + let(:result) { shell('iptables-save') } + it 'zone is set' do - expect(result.stdout).to match(%r{-A PREROUTING -m comment --comment "1101 - ct_target tests - zone" -j CT --zone 4000}) + expect(result.stdout).to match(%r{-A PREROUTING -m comment --comment "1100 - ct_target tests - zone" -j CT --zone 4000}) end end end