From 0a3dc290db9f8d8addcd3f1082bbcf79348c4fee Mon Sep 17 00:00:00 2001 From: Morgan Haskel Date: Mon, 29 Dec 2014 11:41:16 -0800 Subject: [PATCH] MODULES-1355 - Add acceptance test to verify Use the example rule from the ticket to make sure this is working Fixes puppetlabs/puppetlabs-firewall#408 --- spec/acceptance/resource_cmd_spec.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spec/acceptance/resource_cmd_spec.rb b/spec/acceptance/resource_cmd_spec.rb index ca4837a..20b6b15 100644 --- a/spec/acceptance/resource_cmd_spec.rb +++ b/spec/acceptance/resource_cmd_spec.rb @@ -126,4 +126,22 @@ describe 'puppet resource firewall command:', :unless => UNSUPPORTED_PLATFORMS.i end end end + + # version of iptables that ships with el5 doesn't work with the + # ip6tables provider + if default['platform'] !~ /el-5/ + context 'dport/sport with ip6tables' do + before :all do + ip6tables_flush_all_tables + shell('ip6tables -A INPUT -d fe80::/64 -p udp -m udp --dport 546 --sport 547 -j ACCEPT') + end + it do + shell('puppet resource firewall \'000-foobar\' provider=ip6tables') do |r| + r.exit_code.should be_zero + # don't check stdout, testing preexisting rules, output is normal + r.stderr.should be_empty + end + end + end + end end -- 2.45.2