aboutsummaryrefslogtreecommitdiff
path: root/spec/defines/chain_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/defines/chain_spec.rb')
-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