File tree 1 file changed +1
-11
lines changed
1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change 159
159
it {
160
160
is_expected . to contain_exec ( 'remove install pass' ) . with (
161
161
command : 'mysqladmin -u root --password=$(grep -o \'[^ ]\\+$\' /.mysql_secret) password \'\' && rm -f /.mysql_secret' ,
162
- onlyif : 'test -f /.mysql_secret' ,
162
+ onlyif : [ [ 'test' , '-f' , ' /.mysql_secret'] ] ,
163
163
path : '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin' ,
164
164
)
165
165
}
198
198
it { is_expected . not_to contain_mysql_user ( 'root@localhost' ) }
199
199
it { is_expected . not_to contain_file ( '/root/.my.cnf' ) }
200
200
end
201
- describe 'when install_secret_file set to /root/.mysql_secret' do
202
- let ( :params ) { { install_secret_file : '/root/.mysql_secret' } }
203
-
204
- it {
205
- is_expected . to contain_exec ( 'remove install pass' ) . with (
206
- command : 'mysqladmin -u root --password=$(grep -o \'[^ ]\\+$\' /root/.mysql_secret) password \'\' && rm -f /root/.mysql_secret' ,
207
- onlyif : 'test -f /root/.mysql_secret' ,
208
- )
209
- }
210
- end
211
201
end
212
202
213
203
context 'mysql::server::providers' do
You can’t perform that action at this time.
0 commit comments