Skip to content

Commit 20599ea

Browse files
authored
Merge pull request #1035 from JvGinkel/master
#puppethack allow undef value for bind-address
2 parents 79682e7 + da638b4 commit 20599ea

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

spec/classes/mysql_server_spec.rb

+13
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,19 @@
9797

9898
it { is_expected.to contain_file('/tmp/error.log') }
9999
end
100+
context 'default bind-address' do
101+
it { is_expected.to contain_file('mysql-config-file').with_content(%r{^bind-address = 127.0.0.1}) }
102+
end
103+
context 'with defined bind-address' do
104+
let(:params) { { override_options: { 'mysqld' => { 'bind-address' => '1.1.1.1' } } } }
105+
106+
it { is_expected.to contain_file('mysql-config-file').with_content(%r{^bind-address = 1.1.1.1}) }
107+
end
108+
context 'without bind-address' do
109+
let(:params) { { override_options: { 'mysqld' => { 'bind-address' => :undef } } } }
110+
111+
it { is_expected.to contain_file('mysql-config-file').without_content(%r{^bind-address}) }
112+
end
100113
end
101114

102115
context 'mysql::server::root_password' do

0 commit comments

Comments
 (0)