You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add false skip-ssl flag to sles-15 tests as sles-15 is using a mysql version that is stricter in terms of ssl checks.
- Update references to mysql to be mysql or mariadb (depending on the platform) as mysql gives a deprecation warning in newer platforms.
unless => '/usr/bin/mysql -NBe "SELECT 1 FROM foo.bar LIMIT 1;"',
286
+
unless => '/usr/bin/#{mysql_cmd} -NBe "SELECT 1 FROM foo.bar LIMIT 1;"',
285
287
require => Mysql_database['foo'],
286
288
}
287
289
@@ -387,7 +389,7 @@ class { 'mysql::server':
387
389
describe'adding procedure privileges'do
388
390
pp=<<-MANIFEST
389
391
exec { 'simpleproc-create':
390
-
command => 'mysql --user="root" --password="password" --database=mysql --delimiter="//" -NBe "CREATE PROCEDURE simpleproc (OUT param1 INT) BEGIN SELECT COUNT(*) INTO param1 FROM t; end//"',
392
+
command => "#{mysql_cmd} --user='root' --password='password' --database=mysql --delimiter='//' -NBe \\"CREATE PROCEDURE simpleproc (OUT param1 INT) BEGIN SELECT COUNT(*) INTO param1 FROM t; END//\\"",
391
393
path => '/usr/bin/',
392
394
before => Mysql_user['test2@tester'],
393
395
}
@@ -407,7 +409,7 @@ class { 'mysql::server':
407
409
end
408
410
409
411
it'finds the user #stdout'do
410
-
result=run_shell('mysql -NBe "SHOW GRANTS FOR test2@tester"')
412
+
result=run_shell("#{mysql_cmd} -NBe \"SHOW GRANTS FOR test2@tester\"")
411
413
expect(result.stdout).tomatch(%r{GRANT EXECUTE ON PROCEDURE `mysql`.`simpleproc` TO ['|`]test2['|`]@['|`]tester['|`]})
412
414
expect(result.stderr).tobe_empty
413
415
end
@@ -417,7 +419,7 @@ class { 'mysql::server':
417
419
it'works without errors'do
418
420
pp=<<-MANIFEST
419
421
exec { 'simplefunc-create':
420
-
command => '/usr/bin/mysql --user="root" --password="password" --database=mysql -NBe "CREATE FUNCTION simplefunc (s CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN CONCAT(\\'Hello, \\', s, \\'!\\')"',
422
+
command => "/usr/bin/#{mysql_cmd} --user='root' --password='password' --database=mysql -NBe \\"CREATE FUNCTION simplefunc (s CHAR(20)) RETURNS CHAR(50) DETERMINISTIC RETURN CONCAT('Hello, ', s, '!')\\"",
421
423
before => Mysql_user['test3@tester'],
422
424
}
423
425
@@ -438,7 +440,7 @@ class { 'mysql::server':
438
440
end
439
441
440
442
it'finds the user'do
441
-
result=run_shell('mysql -NBe "SHOW GRANTS FOR test3@tester"')
443
+
result=run_shell("#{mysql_cmd} -NBe \"SHOW GRANTS FOR test3@tester\"")
442
444
expect(result.stdout).tomatch(%r{GRANT EXECUTE ON FUNCTION `mysql`.`simplefunc` TO ['|`]test3['|`]@['|`]tester['|`]})
443
445
expect(result.stderr).tobe_empty
444
446
end
@@ -463,7 +465,7 @@ class { 'mysql::server':
463
465
end
464
466
465
467
it'finds the user #stdout'do
466
-
run_shell('mysql -NBe "SHOW GRANTS FOR proxy1@tester"')do |r|
468
+
run_shell("#{mysql_cmd} -NBe \"SHOW GRANTS FOR proxy1@tester\"")do |r|
467
469
expect(r.stdout).tomatch(%r{GRANT USAGE ON *.* TO ['|`]proxy1['|`]@['|`]tester['|`]\nGRANT PROXY ON ['|`]proxy_user['|`]@['|`]proxy_host['|`] TO ['|`]proxy1['|`]@['|`]tester['|`]\n})
468
470
expect(r.stderr).tobe_empty
469
471
end
@@ -488,7 +490,7 @@ class { 'mysql::server':
488
490
end
489
491
490
492
it'finds the user #stdout'do
491
-
run_shell('mysql -NBe "SHOW GRANTS FOR proxy1@tester"')do |r|
493
+
run_shell("#{mysql_cmd} -NBe \"SHOW GRANTS FOR proxy1@tester\"")do |r|
492
494
expect(r.stdout).not_tomatch(%r{GRANT PROXY ON 'proxy_user'@'proxy_host' TO ['|`]proxy1['|`]@['|`]tester['|`]})
493
495
expect(r.stderr).tobe_empty
494
496
end
@@ -514,7 +516,7 @@ class { 'mysql::server':
514
516
end
515
517
516
518
it'does not find the user'do
517
-
result=run_shell('mysql -NBe "SHOW GRANTS FOR proxy2@tester"',expect_failures: true)
519
+
result=run_shell("#{mysql_cmd} -NBe \"SHOW GRANTS FOR proxy2@tester\"",expect_failures: true)
518
520
expect(result.stderr).tomatch(%r{There is no such grant defined for user 'proxy2' on host 'tester'})
519
521
end
520
522
end
@@ -538,7 +540,7 @@ class { 'mysql::server':
538
540
end
539
541
540
542
it'does not find the user'do
541
-
result=run_shell('mysql -NBe "SHOW GRANTS FOR proxy2@tester"',expect_failures: true)
543
+
result=run_shell("#{mysql_cmd} -NBe \"SHOW GRANTS FOR proxy2@tester\"",expect_failures: true)
542
544
expect(result.stderr).tomatch(%r{There is no such grant defined for user 'proxy2' on host 'tester'})
543
545
end
544
546
end
@@ -562,7 +564,7 @@ class { 'mysql::server':
562
564
end
563
565
564
566
it'does not find the user'do
565
-
result=run_shell('mysql -NBe "SHOW GRANTS FOR proxy3@tester"',expect_failures: true)
567
+
result=run_shell("#{mysql_cmd} -NBe \"SHOW GRANTS FOR proxy3@tester\"",expect_failures: true)
566
568
expect(result.stderr).tocontain(%r{There is no such grant defined for user 'proxy3' on host 'tester'})
0 commit comments