]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Add tests for socket option
authorKen Barber <ken@bob.sh>
Fri, 22 Feb 2013 15:03:10 +0000 (15:03 +0000)
committerKen Barber <ken@bob.sh>
Fri, 22 Feb 2013 15:03:10 +0000 (15:03 +0000)
Signed-off-by: Ken Barber <ken@bob.sh>
spec/fixtures/iptables/conversion_hash.rb

index c3c0c8c52fbeb586fceb9daa102bb653a5184c53..f416462eaef1133366d19d38427e65fc689f8537 100644 (file)
@@ -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'],
+  },
 }