]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Unit test fix for travis
authorHelen Campbell <helen@puppet.com>
Tue, 5 Sep 2017 08:50:28 +0000 (09:50 +0100)
committerHelen Campbell <helen@puppet.com>
Tue, 5 Sep 2017 09:22:51 +0000 (10:22 +0100)
spec/acceptance/hashlimit_spec.rb
spec/unit/puppet/provider/iptables_spec.rb

index 1dd57f814519be59f34ccec31347daed5fcff4b1..49b8bd1fb91f885ba19a980a0ac24d0030f9e589 100644 (file)
@@ -29,7 +29,7 @@ describe 'hashlimit property' do
 
       it 'should contain the rule' do
         shell('iptables-save') do |r|
-          expect(r.stdout).to match(/-A INPUT -p tcp -m hashlimit --hashlimit-above 526\/sec --hashlimit-mode srcip,dstip --hashlimit-name above --hashlimit-htable-gcinterval 10 -m comment --comment "800 - hashlimit_above test" -j ACCEPT/)
+          expect(r.stdout).to match(/-A INPUT -p tcp -m hashlimit --hashlimit-above 526\/sec --hashlimit-burst 5 --hashlimit-mode srcip,dstip --hashlimit-name above --hashlimit-htable-gcinterval 10 -m comment --comment "800 - hashlimit_above test" -j ACCEPT/)
         end
       end
     end
@@ -56,7 +56,7 @@ describe 'hashlimit property' do
 
       it 'should contain the rule' do
         shell('ip6tables-save') do |r|
-          expect(r.stdout).to match(/-A INPUT -p tcp -m hashlimit --hashlimit-above 526\/sec --hashlimit-mode srcip,dstip --hashlimit-name above-ip6 --hashlimit-htable-gcinterval 10 -m comment --comment "801 - hashlimit_above test ipv6" -j ACCEPT/)
+          expect(r.stdout).to match(/-A INPUT -p tcp -m hashlimit --hashlimit-above 526\/sec --hashlimit-burst 5 --hashlimit-mode srcip,dstip --hashlimit-name above-ip6 --hashlimit-htable-gcinterval 10 -m comment --comment "801 - hashlimit_above test ipv6" -j ACCEPT/)
         end
       end
     end
index d5e008288809bae4ee5b10653befda7779dc2309..1ff9cc41d8ba4a425ca42614232acbe742bbd1e8 100644 (file)
@@ -425,6 +425,7 @@ describe 'ip6tables provider' do
         let(:instance) { provider6.new(resource) }
 
         it 'general_args should be valid' do
+          data[:args].unshift("--wait") if instance.general_args.flatten.include? '--wait'
           expect(instance.general_args.flatten).to eql data[:args]
         end
       end