From 8c463d21631205d33ce05e229a8764f5298dee98 Mon Sep 17 00:00:00 2001 From: Helen Campbell Date: Mon, 4 Sep 2017 15:15:01 +0100 Subject: [PATCH] Fix to update hashlimit above test --- spec/acceptance/hashlimit_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/acceptance/hashlimit_spec.rb b/spec/acceptance/hashlimit_spec.rb index 303dd81..1dd57f8 100644 --- a/spec/acceptance/hashlimit_spec.rb +++ b/spec/acceptance/hashlimit_spec.rb @@ -16,7 +16,7 @@ describe 'hashlimit property' do chain => 'INPUT', proto => 'tcp', hashlimit_name => 'above', - hashlimit_above => '512kb/s', + hashlimit_above => '526/sec', hashlimit_htable_gcinterval => '10', hashlimit_mode => 'srcip,dstip', action => accept, @@ -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 512kb\/s --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-mode srcip,dstip --hashlimit-name above --hashlimit-htable-gcinterval 10 -m comment --comment "800 - hashlimit_above test" -j ACCEPT/) end end end @@ -43,7 +43,7 @@ describe 'hashlimit property' do provider => 'ip6tables', proto => 'tcp', hashlimit_name => 'above-ip6', - hashlimit_above => '512kb/s', + hashlimit_above => '526/sec', hashlimit_htable_gcinterval => '10', hashlimit_mode => 'srcip,dstip', action => accept, @@ -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 512kb\/s --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-mode srcip,dstip --hashlimit-name above-ip6 --hashlimit-htable-gcinterval 10 -m comment --comment "801 - hashlimit_above test ipv6" -j ACCEPT/) end end end -- 2.45.2