From: lionce Date: Tue, 8 Oct 2019 11:46:03 +0000 (+0300) Subject: fix tests for debian10 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=0404a081c431bca9b2713cd3a5aed3f615913f28;p=puppet-modules%2Fpuppetlabs-firewall.git fix tests for debian10 --- diff --git a/spec/acceptance/firewall_attributes_exceptions_spec.rb b/spec/acceptance/firewall_attributes_exceptions_spec.rb index f810da2..c19e1f1 100644 --- a/spec/acceptance/firewall_attributes_exceptions_spec.rb +++ b/spec/acceptance/firewall_attributes_exceptions_spec.rb @@ -9,6 +9,10 @@ describe 'firewall basics', docker: true do end iptables_flush_all_tables ip6tables_flush_all_tables + if os[:family] == 'debian' && os[:release] == '10' + # in order to avoid this stderr: Warning: ip6tables-legacy tables present, use ip6tables-legacy-save to see them\n" + run_shell('update-alternatives --set iptables /usr/sbin/iptables-legacy') + end end # --bytecode is only supported by operatingsystems using nftables (in general Linux kernel 3.13, RedHat 7 (and derivates) with 3.10) diff --git a/spec/acceptance/firewall_attributes_ipv6_exceptions_spec.rb b/spec/acceptance/firewall_attributes_ipv6_exceptions_spec.rb index 6811cc8..263ce70 100644 --- a/spec/acceptance/firewall_attributes_ipv6_exceptions_spec.rb +++ b/spec/acceptance/firewall_attributes_ipv6_exceptions_spec.rb @@ -4,6 +4,10 @@ describe 'firewall ipv6 attribute testing, exceptions' do before(:all) do iptables_flush_all_tables ip6tables_flush_all_tables + if os[:family] == 'debian' && os[:release] == '10' + # in order to avoid this stderr: Warning: ip6tables-legacy tables present, use ip6tables-legacy-save to see them\n" + run_shell('update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy') + end end describe 'standard attributes', unless: (os[:family] == 'redhat' && os[:release].start_with?('5', '6')) || (os[:family] == 'sles') do