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(
|
||||
'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]'
|
||||
)}
|
||||
|
||||
|
@ -293,7 +293,12 @@ describe 'mysql::config' do
|
|||
end
|
||||
|
||||
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
|
||||
|
||||
it { should contain_exec('set_mysql_rootpw').with(
|
||||
|
@ -304,7 +309,7 @@ describe 'mysql::config' do
|
|||
)}
|
||||
|
||||
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]'
|
||||
)}
|
||||
|
||||
|
|
|
@ -4,4 +4,4 @@ host=localhost
|
|||
<% unless @root_password == 'UNSET' -%>
|
||||
password='<%= @root_password %>'
|
||||
<% end -%>
|
||||
socket=<%= socket %>
|
||||
socket=<%= @socket -%>
|
||||
|
|
Loading…
Reference in a new issue