diff options
author | Tim Meusel <tim@bastelfreak.de> | 2018-12-19 13:59:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-19 13:59:33 +0100 |
commit | 85e400ba3a89c47546a8d11a74424bba92685b7c (patch) | |
tree | d76b99423d5d5b05ed5ce3e38c80ed3be1ac3411 /spec/defines | |
parent | 0a25439016f4e99d4f73457c9f19436329608ca6 (diff) | |
parent | f3136278ebd816c58e305e937254e5ca0e2c0a91 (diff) | |
download | puppet-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.rb | 14 |
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 |