From 221c45769e56ffda0ac82bd035e0ef5f37706836 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 12 Sep 2019 15:01:58 +0200 Subject: readd Debian 9/10 support --- spec/classes/ferm_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec/classes') diff --git a/spec/classes/ferm_spec.rb b/spec/classes/ferm_spec.rb index 225577b..3257fca 100644 --- a/spec/classes/ferm_spec.rb +++ b/spec/classes/ferm_spec.rb @@ -17,7 +17,7 @@ describe 'ferm' do it { is_expected.to contain_class('ferm::service') } it { is_expected.to contain_class('ferm::install') } it { is_expected.to contain_package('ferm') } - if facts[:os]['release']['major'].to_i == 10 + if facts[:os]['name'] == 'Debian' it { is_expected.to contain_file('/etc/ferm/ferm.d') } it { is_expected.to contain_file('/etc/ferm/ferm.d/definitions') } it { is_expected.to contain_file('/etc/ferm/ferm.d/chains') } @@ -51,7 +51,7 @@ describe 'ferm' do { manage_configfile: true } end - if facts[:os]['name'] == 'Ubuntu' || facts[:os]['release']['major'].to_i == 10 + if facts[:os]['family'] == 'Debian' it { is_expected.to contain_concat('/etc/ferm/ferm.conf') } else it { is_expected.to contain_concat('/etc/ferm.conf') } @@ -102,7 +102,7 @@ describe 'ferm' do it { is_expected.to contain_concat__fragment('filter-INPUT-policy') } it { is_expected.to contain_concat__fragment('filter-FORWARD-policy') } it { is_expected.to contain_concat__fragment('filter-OUTPUT-policy') } - if facts[:os]['release']['major'].to_i == 10 + if facts[:os]['name'] == 'Debian' it { is_expected.to contain_concat('/etc/ferm/ferm.d/chains/raw-PREROUTING.conf') } it { is_expected.to contain_concat('/etc/ferm/ferm.d/chains/raw-OUTPUT.conf') } it { is_expected.to contain_concat('/etc/ferm/ferm.d/chains/nat-PREROUTING.conf') } -- cgit v1.2.3