From a22bf4141560e00f0a366e9053833b824ff8cc24 Mon Sep 17 00:00:00 2001 From: Jonathan Tripathy Date: Thu, 7 May 2015 19:17:57 +0100 Subject: [PATCH] Test fixes --- spec/acceptance/match_mark_spec.rb | 5 +++++ spec/acceptance/params_spec.rb | 6 ++++++ 2 files changed, 11 insertions(+) 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 -- 2.45.2