Fix when not managing config file

This code have been remove here 4bab65edcb (diff-0938042fe2382aeb10032aa7f8444995) but it is required otherwise we get an `Evaluation Error: Unknown variable: 'install_db_args'.` when using `manage_config_file = false`
This commit is contained in:
Mickaël Canévet 2015-08-19 14:27:25 +02:00
parent 7681c1363a
commit 6228846ae0
2 changed files with 7 additions and 1 deletions

View file

@ -11,7 +11,8 @@ class mysql::server::installdb {
if $mysql::server::manage_config_file {
$install_db_args = "--basedir=${basedir} --defaults-extra-file=${config_file} --datadir=${datadir} --user=${mysqluser}"
} else {
$install_db_args = "--basedir=${basedir} --datadir=${datadir} --user=${mysqluser}"
}
exec { 'mysql_install_db':

View file

@ -19,6 +19,11 @@ describe 'mysql::server' do
it { is_expected.to contain_class('mysql::server::account_security') }
end
context 'when not managing config file' do
let(:params) {{ :manage_config_file => false }}
it { is_expected.to compile.with_all_deps }
end
context 'mysql::server::install' do
it 'contains the package by default' do
is_expected.to contain_package('mysql-server').with({