From: Helen Campbell Date: Tue, 5 Sep 2017 08:50:28 +0000 (+0100) Subject: Unit test fix for travis X-Git-Tag: 1.10.0~18^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=974e813cd8073f40d68a6db78ca3cfe18ec128c4;p=puppet-modules%2Fpuppetlabs-firewall.git Unit test fix for travis --- diff --git a/spec/acceptance/hashlimit_spec.rb b/spec/acceptance/hashlimit_spec.rb index 1dd57f8..49b8bd1 100644 --- a/spec/acceptance/hashlimit_spec.rb +++ b/spec/acceptance/hashlimit_spec.rb @@ -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 diff --git a/spec/unit/puppet/provider/iptables_spec.rb b/spec/unit/puppet/provider/iptables_spec.rb index d5e0082..1ff9cc4 100644 --- a/spec/unit/puppet/provider/iptables_spec.rb +++ b/spec/unit/puppet/provider/iptables_spec.rb @@ -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