Merge pull request #166 from ekohl/quote-mycnf

Quote the password
This commit is contained in:
Hunter Haugen 2013-06-26 10:23:14 -07:00
commit deba75d18a
2 changed files with 3 additions and 3 deletions

View file

@ -70,7 +70,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'\n",
'require' => 'Exec[set_mysql_rootpw]'
)}
@ -203,7 +203,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'\n",
'require' => 'Exec[set_mysql_rootpw]'
)}

View file

@ -2,5 +2,5 @@
user=root
host=localhost
<% unless @root_password == 'UNSET' -%>
password=<%= @root_password %>
password='<%= @root_password %>'
<% end -%>