Add findtime to the fail2ban::jail resource
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
require "#{File.join(File.dirname(__FILE__),'..','spec_helper.rb')}"
|
||||
require File.join(File.dirname(__FILE__), '..', 'spec_helper.rb')
|
||||
|
||||
describe 'fail2ban::jail' do
|
||||
|
||||
@@ -7,14 +7,15 @@ describe 'fail2ban::jail' do
|
||||
let(:facts) { { :ipaddress => '10.42.42.42', :jails_file => '/etc/fail2ban/jail.local', :concat_basedir => '/var/lib/puppet/concat'} }
|
||||
|
||||
describe 'Test basic jail.local is created' do
|
||||
let(:params) { { :name => 'sample1',
|
||||
:port => '42',
|
||||
:logpath => '/path/to/somelog',
|
||||
:enable => true, } }
|
||||
let(:params) { { :name => 'sample1',
|
||||
:port => '42',
|
||||
:logpath => '/path/to/somelog',
|
||||
:enable => true,
|
||||
:findtime => '9000', } }
|
||||
|
||||
it { should include_class('concat::setup') }
|
||||
# it { should contain_concat__fragment('fail2ban_jail_sample1').with_target('/etc/fail2ban/jail.local').with_content(/*port = 42
|
||||
#logpath = \/path\/to\/somelog*/) }
|
||||
it { should contain_concat__fragment('fail2ban_jail_sample1').with_target('/etc/fail2ban/jail.local').with_content("##################\n[fail2ban::jail]\nenabled = true\nfilter = fail2ban::jail\nport = 42\nlogpath = /path/to/somelog\n\n") }
|
||||
it { should contain_concat__fragment('fail2ban_jail_sample1').with_target('/etc/fail2ban/jail.local').with_content("##################\n[fail2ban::jail]\nenabled = true\nfilter = fail2ban::jail\nport = 42\nlogpath = /path/to/somelog\nfindtime = 9000\n\n") }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user