File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 47
47
it { is_expected . to contain_file ( 'mysql-config-file' ) . with_content ( %r{ssl = false} ) }
48
48
end
49
49
50
+ describe 'ssl set to false filters out ssl options' do
51
+ let ( :params ) { { override_options : { 'mysqld' => { 'ssl' => false , 'ssl-disable' => false , 'ssl-key' => '/etc/key.pem' } } } }
52
+
53
+ it { is_expected . to contain_file ( 'mysql-config-file' ) . with_content ( %r{ssl = false} ) }
54
+ it { is_expected . to contain_file ( 'mysql-config-file' ) . without_content ( %r{ssl-key} ) }
55
+ end
56
+
50
57
# ssl-disable (and ssl) are special cased within mysql.
51
58
describe 'possibility of disabling ssl completely' do
52
59
let ( :params ) { { override_options : { 'mysqld' => { 'ssl' => true , 'ssl-disable' => true } } } }
53
60
54
61
it { is_expected . to contain_file ( 'mysql-config-file' ) . without_content ( %r{ssl = true} ) }
55
62
end
56
63
64
+ describe 'ssl-disable filters other ssl options' do
65
+ let ( :params ) { { override_options : { 'mysqld' => { 'ssl' => true , 'ssl-disable' => true , 'ssl-key' => '/etc/key.pem' } } } }
66
+
67
+ it { is_expected . to contain_file ( 'mysql-config-file' ) . without_content ( %r{ssl = true} ) }
68
+ it { is_expected . to contain_file ( 'mysql-config-file' ) . without_content ( %r{ssl-disable} ) }
69
+ it { is_expected . to contain_file ( 'mysql-config-file' ) . without_content ( %r{ssl-key} ) }
70
+ end
71
+
57
72
describe 'a non ssl option set to true' do
58
73
let ( :params ) { { override_options : { 'mysqld' => { 'test' => true } } } }
59
74
You can’t perform that action at this time.
0 commit comments