Merge pull request #791 from roidelapluie/empty-string-as-parameter

Re-Add the ability to set a empty string as option parameter
This commit is contained in:
Igor Galić 2016-01-11 12:20:57 +01:00
commit 0b3e310ba7
2 changed files with 6 additions and 1 deletions

View file

@ -29,6 +29,11 @@ describe 'mysql::server' do
end
end
describe 'skip-name-resolve set to an empty string' do
let(:params) {{ :override_options => { 'mysqld' => { 'skip-name-resolve' => '' }}}}
it { is_expected.to contain_file('mysql-config-file').with_content(/^skip-name-resolve$/) }
end
describe 'ssl set to true' do
let(:params) {{ :override_options => { 'mysqld' => { 'ssl' => true }}}}
it { is_expected.to contain_file('mysql-config-file').with_content(/ssl/) }

View file

@ -6,7 +6,7 @@
<% v.sort.map do |ki, vi| -%>
<% if ki == 'ssl-disable' or (ki =~ /^ssl/ and v['ssl-disable'] == true) -%>
<% next %>
<% elsif vi == true or v == '' -%>
<% elsif vi == true or vi == '' -%>
<%= ki %>
<% elsif vi.is_a?(Array) -%>
<% vi.each do |vii| -%>