]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Test fixes
authorJonathan Tripathy <jt@puppetlabs.com>
Thu, 7 May 2015 18:17:57 +0000 (19:17 +0100)
committerJonathan Tripathy <jt@puppetlabs.com>
Thu, 7 May 2015 18:19:25 +0000 (19:19 +0100)
spec/acceptance/match_mark_spec.rb
spec/acceptance/params_spec.rb

index 98f4fc54de631973b586e4c8b401b806dd195573..a2fff4930316c9d176e21a811cabb4d30e806b50 100644 (file)
@@ -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
index 37fe980617672a4ea4ec940c6d843b6c968960e7..ca6652e0b65e1210c0d4f138fd26f510902f1c01 100644 (file)
@@ -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