From: Ken Barber Date: Fri, 22 Feb 2013 15:03:10 +0000 (+0000) Subject: Add tests for socket option X-Git-Tag: 0.1.0~9^2~2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=99a802b2f306dd66482723d631968b967b0bb5ca;p=puppet-modules%2Fpuppetlabs-firewall.git Add tests for socket option Signed-off-by: Ken Barber --- diff --git a/spec/fixtures/iptables/conversion_hash.rb b/spec/fixtures/iptables/conversion_hash.rb index c3c0c8c..f416462 100644 --- a/spec/fixtures/iptables/conversion_hash.rb +++ b/spec/fixtures/iptables/conversion_hash.rb @@ -289,6 +289,15 @@ ARGS_TO_HASH = { :pkttype => 'multicast', }, }, + 'socket_option' => { + :line => '-A PREROUTING -m socket -j ACCEPT', + :table => 'mangle', + :params => { + :action => 'accept', + :chain => 'PREROUTING', + :socket => true, + }, + }, } # This hash is for testing converting a hash to an argument line. @@ -643,4 +652,14 @@ HASH_TO_ARGS = { }, :args => ["-t", :filter, "-i", "eth0", "-p", :tcp, "-m", "pkttype", "--pkt-type", :multicast, "-m", "comment", "--comment", "062 pkttype multicast", "-j", "ACCEPT"], }, + 'socket_option' => { + :params => { + :name => '050 socket option', + :table => 'mangle', + :action => 'accept', + :chain => 'PREROUTING', + :socket => true, + }, + :args => ['-t', :mangle, '-m', 'socket', '-j', 'ACCEPT'], + }, }