Skip to content

Commit

Permalink
(MODULES-1804) Allow override of log-error
Browse files Browse the repository at this point in the history
The mysqld log-error setting may be passed by override_options, but
server/service.pp was not using the overridden value. This fixes that.
  • Loading branch information
hunner committed Feb 27, 2015
1 parent 037d30d commit ce43899
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manifests/server/service.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#
class mysql::server::service {
$options = $mysql::server::options

if $mysql::server::real_service_manage {
if $mysql::server::real_service_enabled {
Expand All @@ -9,7 +10,7 @@
}
}

file { $mysql::params::log_error:
file { $options['mysqld']['log-error']:
ensure => present,
owner => 'mysql',
group => 'mysql',
Expand Down
4 changes: 4 additions & 0 deletions spec/classes/mysql_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
})
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
Expand Down

0 comments on commit ce43899

Please sign in to comment.