Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Haskel committed Dec 3, 2014
1 parent dd18553 commit 615cdd2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manifests/params.pp
Expand Up @@ -28,7 +28,7 @@
if $::operatingsystemrelease =~ /^6\./ and versioncmp($::iptables_persistent_version, '0.5.0') < 0 {
$service = undef
$package = 'iptables-persistent'
} elsif $::operatingsystem == 'Debian' and $::operatingsystemrelease == 'jessie/sid' {
} elsif $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8.0') >= 0 {
$service = 'netfilter-persistent'
$package = 'netfilter-persistent'
} else {
Expand Down
28 changes: 28 additions & 0 deletions spec/unit/classes/firewall_linux_debian_spec.rb
Expand Up @@ -56,4 +56,32 @@
:enable => 'false'
)}
end

context "Debian 8, alt operatingsystem" do
let(:facts) {{
:osfamily => 'Debian',
:operatingsystem => 'Debian',
:operatingsystemrelease => '8.0'
}}
it { should contain_package('netfilter-persistent').with(
:ensure => 'present'
)}
it { should contain_service('netfilter-persistent').with(
:ensure => nil,
:enable => 'true',
:require => 'Package[netfilter-persistent]'
)}
end

context 'deb8, alt operatingsystem, enable => false' do
let(:facts) {{
:osfamily => 'Debian',
:operatingsystem => 'Debian',
:operatingsystemrelease => '8.0'
}}
let(:params) {{ :enable => 'false' }}
it { should contain_service('netfilter-persistent').with(
:enable => 'false'
)}
end
end

0 comments on commit 615cdd2

Please sign in to comment.