(MODULES-1804) Allow override of log-error

The mysqld log-error setting may be passed by override_options, but
server/service.pp was not using the overridden value. This fixes that.
This commit is contained in:
Hunter Haugen 2015-02-27 09:54:00 -08:00
parent 037d30d82c
commit ce43899af3
2 changed files with 6 additions and 1 deletions

View file

@ -1,5 +1,6 @@
#
class mysql::server::service {
$options = $mysql::server::options
if $mysql::server::real_service_manage {
if $mysql::server::real_service_enabled {
@ -9,7 +10,7 @@ class mysql::server::service {
}
}
file { $mysql::params::log_error:
file { $options['mysqld']['log-error']:
ensure => present,
owner => 'mysql',
group => 'mysql',

View file

@ -45,6 +45,10 @@ describe 'mysql::server' do
})
end
end
context 'with log-error overridden' do
let(:params) {{ :override_options => { 'mysqld' => { 'log-error' => '/tmp/error.log' }} }}
it { is_expected.to contain_file('/tmp/error.log') }
end
end
context 'mysql::server::root_password' do