]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Add docs and tests
authorHunter Haugen <hunter@puppet.com>
Thu, 9 Feb 2017 17:17:39 +0000 (09:17 -0800)
committerHunter Haugen <hunter@puppet.com>
Wed, 15 Mar 2017 23:39:40 +0000 (16:39 -0700)
README.markdown
spec/unit/classes/firewall_spec.rb
spec/unit/puppet/util/ipcidr_spec.rb

index a06d423746146388d8161bcca07bbc309f69891b..f6b25299423b662505542b94e9e8fc314bde5cd7 100644 (file)
@@ -393,6 +393,10 @@ Parameter that controls the state of the iptables package on your system, allowi
 
 `ensure` can either be 'present' or 'latest'. Defaults to 'present'.
 
+#### ebtables_manage
+
+Parameter that controls whether puppet manages the ebtables package or not. If managed, the package will use the value of `pkg_ensure` as its ensure value.
+
 #### service_name
 
 Specify the name of the IPv4 iptables service. Defaults defined in `firewall::params`.
index 7c9f714300aaa70c67a6d1b5aca2061f57472629..470e1b3470e0ea91d1cd044857c0942db1f31945 100644 (file)
@@ -32,4 +32,10 @@ describe 'firewall', :type => :class do
     let(:params) {{ :ensure => 'test' }}
     it { expect { should contain_class('firewall::linux') }.to raise_error(Puppet::Error) }
   end
+
+  context 'ebtables_manage => true' do
+    let(:facts) {{ :kernel => 'Linux' }}
+    let(:params) {{ :ebtables_manage => true }}
+    it { expect { should contain_package('ebtables') }.to raise_error(Puppet::Error) }
+  end
 end
index 8f718d2e1da6a292f7ed982299c3c6ae0926d8ae..0de71285d0ce45890814cdc1b544375782f41049 100644 (file)
@@ -1,4 +1,5 @@
 require 'spec_helper'
+requier 'puppet/util/ipcidr'
 
 describe 'Puppet::Util::IPCidr' do
   describe 'ipv4 address' do