aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Meusel <tim@bastelfreak.de>2018-12-19 09:48:29 +0100
committerTim Meusel <tim@bastelfreak.de>2018-12-19 13:13:52 +0100
commit750675333fdbe6c40b63c75b53e360151780fa24 (patch)
tree2493e3100ef8ed61c4c5783a65ab0e1964cd1a28 /spec
parent0a25439016f4e99d4f73457c9f19436329608ca6 (diff)
downloadpuppet-ferm-750675333fdbe6c40b63c75b53e360151780fa24.tar.gz
puppet-ferm-750675333fdbe6c40b63c75b53e360151780fa24.tar.bz2
Implement logging to kernel log
Diffstat (limited to 'spec')
-rw-r--r--spec/defines/chain_spec.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/defines/chain_spec.rb b/spec/defines/chain_spec.rb
index 7c4e80b..d3ab857 100644
--- a/spec/defines/chain_spec.rb
+++ b/spec/defines/chain_spec.rb
@@ -12,7 +12,8 @@ describe 'ferm::chain', type: :define do
let :params do
{
policy: 'DROP',
- disable_conntrack: false
+ disable_conntrack: false,
+ log_dropped_packets: true
}
end
@@ -21,6 +22,10 @@ describe 'ferm::chain', type: :define do
is_expected.to contain_concat__fragment('INPUT-policy'). \
with_content(%r{ESTABLISHED RELATED})
end
+ it do
+ is_expected.to contain_concat__fragment('INPUT-footer'). \
+ with_content(%r{LOG log-prefix 'INPUT: ';})
+ end
it { is_expected.to contain_concat('/etc/ferm.d/chains/INPUT.conf') }
it { is_expected.to contain_ferm__chain('INPUT') }
end
@@ -29,7 +34,8 @@ describe 'ferm::chain', type: :define do
let :params do
{
policy: 'DROP',
- disable_conntrack: true
+ disable_conntrack: true,
+ log_dropped_packets: false
}
end
@@ -39,6 +45,10 @@ describe 'ferm::chain', type: :define do
is_expected.not_to contain_concat__fragment('INPUT-policy'). \
with_content(%r{ESTABLISHED RELATED})
end
+ it do
+ is_expected.not_to contain_concat__fragment('INPUT-footer'). \
+ with_content(%r{LOG log-prefix 'INPUT: ';})
+ end
end
end
end