e47b4d19e7
* fixed a typo in the documentation * added documentation for parameter +notify_service+ * added rspec test
37 lines
935 B
Ruby
37 lines
935 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'mysql::server::config', :type => :define do
|
|
filename = '/etc/mysql/conf.d/test_config.cnf'
|
|
|
|
let :facts do
|
|
{ :osfamily => 'Debian'}
|
|
end
|
|
|
|
let(:title) { File.basename(filename, '.cnf') }
|
|
|
|
let(:params) {
|
|
{ 'settings' => {
|
|
'mysqld' => {
|
|
'bind-address' => '0.0.0.0'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
it 'should notify the mysql daemon' do
|
|
should contain_file(filename).with_notify('Exec[mysqld-restart]')
|
|
end
|
|
|
|
it 'should contain config parameter in content' do
|
|
should contain_file(filename).with_content("### MANAGED BY PUPPET ###\n[mysqld]\nbind-address = 0.0.0.0\n\n")
|
|
end
|
|
|
|
it 'should not notify the mysql daemon' do
|
|
params.merge!({ 'notify_service' => false })
|
|
should contain_file(filename).without_notify
|
|
end
|
|
|
|
it 'should require on the mysql-server package' do
|
|
should contain_file(filename).with_require('Package[mysql-server]')
|
|
end
|
|
end
|