From: Jonathan Tripathy Date: Thu, 7 May 2015 18:17:57 +0000 (+0100) Subject: Test fixes X-Git-Tag: 1.6.0~4^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=a22bf4141560e00f0a366e9053833b824ff8cc24;p=puppet-modules%2Fpuppetlabs-firewall.git Test fixes --- diff --git a/spec/acceptance/match_mark_spec.rb b/spec/acceptance/match_mark_spec.rb index 98f4fc5..a2fff49 100644 --- a/spec/acceptance/match_mark_spec.rb +++ b/spec/acceptance/match_mark_spec.rb @@ -2,6 +2,11 @@ require 'spec_helper_acceptance' describe 'firewall type', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + before(:all) do + shell('iptables --flush; iptables -t nat --flush; iptables -t mangle --flush') + shell('ip6tables --flush; ip6tables -t nat --flush; ip6tables -t mangle --flush') + end + if default['platform'] !~ /el-5/ describe 'match_mark' do context '0x1' do diff --git a/spec/acceptance/params_spec.rb b/spec/acceptance/params_spec.rb index 37fe980..ca6652e 100644 --- a/spec/acceptance/params_spec.rb +++ b/spec/acceptance/params_spec.rb @@ -1,6 +1,12 @@ require 'spec_helper_acceptance' describe "param based tests:", :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do + + before(:all) do + shell('iptables --flush; iptables -t nat --flush; iptables -t mangle --flush') + shell('ip6tables --flush; ip6tables -t nat --flush; ip6tables -t mangle --flush') + end + it 'test various params', :unless => (default['platform'].match(/el-5/) || fact('operatingsystem') == 'SLES') do iptables_flush_all_tables