|
282 | 282 | context 'MySQL < 5.7.6' do
|
283 | 283 | it 'changes the authentication plugin' do
|
284 | 284 | provider.class.instance_variable_set(:@mysqld_version_string, mysql_version_string_hash['mysql-5.7.1'][:string])
|
285 |
| - provider.expects(:mysql).with([defaults_file, system_database, '-e', "UPDATE mysql.user SET plugin = 'auth_socket', password = '' WHERE CONCAT(user, '@', host) = 'joe@localhost'"]).returns('0') |
| 285 | + provider.class.expects(:mysql_caller).with("UPDATE mysql.user SET plugin = 'auth_socket', password = '' WHERE CONCAT(user, '@', host) = 'joe@localhost'", 'system').returns('0') |
286 | 286 |
|
287 | 287 | provider.expects(:plugin).returns('auth_socket')
|
288 | 288 | provider.plugin = 'auth_socket'
|
|
292 | 292 | context 'MySQL >= 5.7.6' do
|
293 | 293 | it 'changes the authentication plugin' do
|
294 | 294 | provider.class.instance_variable_set(:@mysqld_version_string, mysql_version_string_hash['mysql-5.7.6'][:string])
|
295 |
| - provider.expects(:mysql).with([defaults_file, system_database, '-e', "ALTER USER 'joe'@'localhost' IDENTIFIED WITH 'auth_socket'"]).returns('0') |
| 295 | + provider.class.expects(:mysql_caller).with("ALTER USER 'joe'@'localhost' IDENTIFIED WITH 'auth_socket'", 'system').returns('0') |
296 | 296 |
|
297 | 297 | provider.expects(:plugin).returns('auth_socket')
|
298 | 298 | provider.plugin = 'auth_socket'
|
|
304 | 304 | context 'MySQL < 5.7.6' do
|
305 | 305 | it 'changes the authentication plugin' do
|
306 | 306 | provider.class.instance_variable_set(:@mysqld_version_string, mysql_version_string_hash['mysql-5.7.1'][:string])
|
307 |
| - provider.expects(:mysql).with([defaults_file, system_database, '-e', "UPDATE mysql.user SET plugin = 'mysql_native_password', password = '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' WHERE CONCAT(user, '@', host) = 'joe@localhost'"]).returns('0') |
| 307 | + provider.class.expects(:mysql_caller).with("UPDATE mysql.user SET plugin = 'mysql_native_password', password = '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4' WHERE CONCAT(user, '@', host) = 'joe@localhost'", 'system').returns('0') |
308 | 308 |
|
309 | 309 | provider.expects(:plugin).returns('mysql_native_password')
|
310 | 310 | provider.plugin = 'mysql_native_password'
|
|
314 | 314 | context 'MySQL >= 5.7.6' do
|
315 | 315 | it 'changes the authentication plugin' do
|
316 | 316 | provider.class.instance_variable_set(:@mysqld_version_string, mysql_version_string_hash['mysql-5.7.6'][:string])
|
317 |
| - provider.expects(:mysql).with([defaults_file, system_database, '-e', "ALTER USER 'joe'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4'"]).returns('0') |
| 317 | + provider.class.expects(:mysql_caller).with("ALTER USER 'joe'@'localhost' IDENTIFIED WITH 'mysql_native_password' AS '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4'", 'system').returns('0') |
318 | 318 |
|
319 | 319 | provider.expects(:plugin).returns('mysql_native_password')
|
320 | 320 | provider.plugin = 'mysql_native_password'
|
|
0 commit comments