Merge branch 'fix-filter-source' of https://github.com/AddOnline/puppet-fail2ban into AddOnline-fix-filter-source

This commit is contained in:
Javier Bértoli
2013-12-23 17:46:06 -03:00

View File

@@ -97,12 +97,10 @@ enabled = true/) }
describe 'Test customizations - template' do describe 'Test customizations - template' do
let(:params) { {:template => "fail2ban/spec.erb" , :options => { 'opt_a' => 'value_a' } } } let(:params) { {:template => "fail2ban/spec.erb" , :options => { 'opt_a' => 'value_a' } } }
it 'should generate a valid template' do it 'should generate a valid template' do
content = catalogue.resource('file', 'fail2ban.local').send(:parameters)[:content] should contain_file('fail2ban.local').with_content(/fqdn: rspec.example42.com/)
content.should match "fqdn: rspec.example42.com"
end end
it 'should generate a template that uses custom options' do it 'should generate a template that uses custom options' do
content = catalogue.resource('file', 'fail2ban.local').send(:parameters)[:content] should contain_file('fail2ban.local').with_content(/value_a/)
content.should match "value_a"
end end
end end
@@ -136,8 +134,7 @@ enabled = true/) }
} }
end end
it 'should not automatically restart the service, when service_autorestart => false' do it 'should not automatically restart the service, when service_autorestart => false' do
content = catalogue.resource('file', 'fail2ban.local').send(:parameters)[:notify] should contain_file('fail2ban.local').with_notify(nil)
content.should be_nil
end end
end end