Merge pull request #751 from mcanevet/patch-1
Fix when not managing config file
This commit is contained in:
commit
c17c46552b
2 changed files with 7 additions and 1 deletions
|
@ -11,7 +11,8 @@ class mysql::server::installdb {
|
||||||
|
|
||||||
if $mysql::server::manage_config_file {
|
if $mysql::server::manage_config_file {
|
||||||
$install_db_args = "--basedir=${basedir} --defaults-extra-file=${config_file} --datadir=${datadir} --user=${mysqluser}"
|
$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':
|
exec { 'mysql_install_db':
|
||||||
|
|
|
@ -19,6 +19,11 @@ describe 'mysql::server' do
|
||||||
it { is_expected.to contain_class('mysql::server::account_security') }
|
it { is_expected.to contain_class('mysql::server::account_security') }
|
||||||
end
|
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
|
context 'mysql::server::install' do
|
||||||
it 'contains the package by default' do
|
it 'contains the package by default' do
|
||||||
is_expected.to contain_package('mysql-server').with({
|
is_expected.to contain_package('mysql-server').with({
|
||||||
|
|
Loading…
Reference in a new issue