aboutsummaryrefslogtreecommitdiff
path: root/spec/defines
diff options
context:
space:
mode:
authorTim Meusel <tim@bastelfreak.de>2018-12-19 13:59:33 +0100
committerGitHub <noreply@github.com>2018-12-19 13:59:33 +0100
commit85e400ba3a89c47546a8d11a74424bba92685b7c (patch)
treed76b99423d5d5b05ed5ce3e38c80ed3be1ac3411 /spec/defines
parent0a25439016f4e99d4f73457c9f19436329608ca6 (diff)
parentf3136278ebd816c58e305e937254e5ca0e2c0a91 (diff)
downloadpuppet-ferm-85e400ba3a89c47546a8d11a74424bba92685b7c.tar.gz
puppet-ferm-85e400ba3a89c47546a8d11a74424bba92685b7c.tar.bz2
Merge pull request #32 from bastelfreak/log2
Implement logging to kernel log
Diffstat (limited to 'spec/defines')
-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