From 4b2ba8827fde8d61ae3026323867ba84f7a45e7b Mon Sep 17 00:00:00 2001 From: Andjelko Horvat Date: Thu, 8 Dec 2016 23:57:24 +0100 Subject: [PATCH] Add test for rule to hash parser check added in 06cf2ee --- spec/fixtures/iptables/conversion_hash.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spec/fixtures/iptables/conversion_hash.rb b/spec/fixtures/iptables/conversion_hash.rb index 164f67d..53e0b41 100644 --- a/spec/fixtures/iptables/conversion_hash.rb +++ b/spec/fixtures/iptables/conversion_hash.rb @@ -663,6 +663,12 @@ ARGS_TO_HASH = { :proto => "tcp", }, }, + 'parser_sanity_check' => { + :line => '-A INPUT -s 1.2.3.4/32 -p tcp -m tcp --dport 80 --tcp-flags FIN,SYN,RST,ACK SYN -m comment --comment "004 parser sanity check" -j ACCEPT', + :table => 'filter', + :raise_error => true, + :params => {}, + }, } # This hash is for testing converting a hash to an argument line. @@ -1275,4 +1281,4 @@ HASH_TO_ARGS = { }, :args => ["-t", :filter, "-s", "1.2.3.4/32", "-d", "4.3.2.1/32", "-p", :tcp, "-m", "comment", "--comment", "003 nfqueue dont specify queue_num or queue_bypass", "-j", "NFQUEUE"] } -} \ No newline at end of file +} -- 2.45.2