Fixing puppetlabs-mysql PR 174 spec tests
This commit is contained in:
parent
4edf5d48ec
commit
afb8561372
2 changed files with 9 additions and 4 deletions
|
@ -110,7 +110,7 @@ describe 'mysql::config' do
|
||||||
)}
|
)}
|
||||||
|
|
||||||
it { should contain_file('/root/.my.cnf').with(
|
it { should contain_file('/root/.my.cnf').with(
|
||||||
'content' => "[client]\nuser=root\nhost=localhost\npassword='foo'\n",
|
'content' => "[client]\nuser=root\nhost=localhost\npassword='foo'\nsocket=#{osparams[:socket]}",
|
||||||
'require' => 'Exec[set_mysql_rootpw]'
|
'require' => 'Exec[set_mysql_rootpw]'
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -293,7 +293,12 @@ describe 'mysql::config' do
|
||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{:root_password => 'foo', :old_root_password => 'bar', :etc_root_password => true}
|
{
|
||||||
|
:root_password => 'foo',
|
||||||
|
:old_root_password => 'bar',
|
||||||
|
:etc_root_password => true,
|
||||||
|
:socket => '/tmp/mysql.sock',
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
it { should contain_exec('set_mysql_rootpw').with(
|
it { should contain_exec('set_mysql_rootpw').with(
|
||||||
|
@ -304,7 +309,7 @@ describe 'mysql::config' do
|
||||||
)}
|
)}
|
||||||
|
|
||||||
it { should contain_file('/root/.my.cnf').with(
|
it { should contain_file('/root/.my.cnf').with(
|
||||||
'content' => "[client]\nuser=root\nhost=localhost\npassword='foo'\n",
|
'content' => "[client]\nuser=root\nhost=localhost\npassword='foo'\nsocket=#{params[:socket]}",
|
||||||
'require' => 'Exec[set_mysql_rootpw]'
|
'require' => 'Exec[set_mysql_rootpw]'
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
@ -4,4 +4,4 @@ host=localhost
|
||||||
<% unless @root_password == 'UNSET' -%>
|
<% unless @root_password == 'UNSET' -%>
|
||||||
password='<%= @root_password %>'
|
password='<%= @root_password %>'
|
||||||
<% end -%>
|
<% end -%>
|
||||||
socket=<%= socket %>
|
socket=<%= @socket -%>
|
||||||
|
|
Loading…
Reference in a new issue