File tree 2 files changed +20
-4
lines changed
2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 33
33
end
34
34
end
35
35
36
+ describe 'an option set to true' do
37
+ let ( :params ) {
38
+ { :override_options => { 'mysqld' => { 'ssl' => true } } }
39
+ }
40
+ it do
41
+ should contain_file ( '/etc/my.cnf' ) . with_content ( /^\s *ssl\s *(?:$|= true)/m )
42
+ end
43
+ end
44
+
45
+ describe 'an option set to false' do
46
+ let ( :params ) {
47
+ { :override_options => { 'mysqld' => { 'ssl' => false } } }
48
+ }
49
+ it do
50
+ should contain_file ( '/etc/my.cnf' ) . with_content ( /^\s *ssl = false/m )
51
+ end
52
+ end
53
+
36
54
context 'with remove_default_accounts set' do
37
55
let ( :params ) { { :remove_default_accounts => true } }
38
56
it { should contain_class ( 'mysql::server::account_security' ) }
Original file line number Diff line number Diff line change 2
2
<% if v.is_a?(Hash) -%>
3
3
[<%= k %> ]
4
4
<% v.sort.map do |ki, vi| -%>
5
- <% if vi == true -%>
5
+ <% if vi == true or v == '' -%>
6
6
<%= ki %>
7
7
<% elsif vi.is_a?(Array) -%>
8
8
<% vi.each do |vii| -%>
9
9
<%= ki %> = <%= vii %>
10
10
<% end -%>
11
- <% elsif vi and vi != '' -%>
11
+ <% else -%>
12
12
<%= ki %> = <%= vi %>
13
- <% elsif vi -%>
14
- <%= ki %>
15
13
<% end -%>
16
14
<% end -%>
17
15
<% end %>
You can’t perform that action at this time.
0 commit comments