From: Morgan Haskel Date: Mon, 29 Dec 2014 19:41:16 +0000 (-0800) Subject: MODULES-1355 - Add acceptance test to verify X-Git-Tag: 1.4.0~27^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=0a3dc290db9f8d8addcd3f1082bbcf79348c4fee;p=puppet-modules%2Fpuppetlabs-firewall.git 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 --- 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