]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
MODULES-1355 - Add acceptance test to verify
authorMorgan Haskel <morgan@puppetlabs.com>
Mon, 29 Dec 2014 19:41:16 +0000 (11:41 -0800)
committerMorgan Haskel <morgan@puppetlabs.com>
Mon, 29 Dec 2014 19:41:53 +0000 (11:41 -0800)
Use the example rule from the ticket to make sure this is working

Fixes puppetlabs/puppetlabs-firewall#408

spec/acceptance/resource_cmd_spec.rb

index ca4837a49fdfb960d7fbd61503e663e3f0dfa73e..20b6b15e8540780228dc4e29e3131b0c65a7ae7e 100644 (file)
@@ -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