Skip to content

Commit da638b4

Browse files
Jethro van GinkelJethro van Ginkel
Jethro van Ginkel
authored and
Jethro van Ginkel
committed
Revert template change + rubocop changes
1 parent 38a7aa0 commit da638b4

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

spec/classes/mysql_server_spec.rb

+3-5
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,17 @@
9898
it { is_expected.to contain_file('/tmp/error.log') }
9999
end
100100
context 'default bind-address' do
101-
let(:params) { }
102-
103-
it { is_expected.to contain_file('mysql-config-file').with_content(/^bind-address = 127.0.0.1/) }
101+
it { is_expected.to contain_file('mysql-config-file').with_content(%r{^bind-address = 127.0.0.1}) }
104102
end
105103
context 'with defined bind-address' do
106104
let(:params) { { override_options: { 'mysqld' => { 'bind-address' => '1.1.1.1' } } } }
107105

108-
it { is_expected.to contain_file('mysql-config-file').with_content(/^bind-address = 1.1.1.1/) }
106+
it { is_expected.to contain_file('mysql-config-file').with_content(%r{^bind-address = 1.1.1.1}) }
109107
end
110108
context 'without bind-address' do
111109
let(:params) { { override_options: { 'mysqld' => { 'bind-address' => :undef } } } }
112110

113-
it { is_expected.to contain_file('mysql-config-file').without_content(/^bind-address/) }
111+
it { is_expected.to contain_file('mysql-config-file').without_content(%r{^bind-address}) }
114112
end
115113
end
116114

templates/my.cnf.erb

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
<% v.sort.map do |ki, vi| -%>
77
<% if ki == 'ssl-disable' or (ki =~ /^ssl/ and v['ssl-disable'] == true) -%>
88
<% next %>
9-
<% elsif ki == 'bind-address' and vi == :undef -%>
10-
<% next %>
119
<% elsif vi == true or vi == '' -%>
1210
<%= ki %>
1311
<% elsif vi.is_a?(Array) -%>

0 commit comments

Comments
 (0)