Merge pull request #874 from bmjen/fix-grants
Fixes procedure grant tests for 5.7.12
This commit is contained in:
commit
05c4bafdb5
1 changed files with 10 additions and 3 deletions
|
@ -412,12 +412,19 @@ describe 'mysql_grant' do
|
|||
describe 'adding procedure privileges' do
|
||||
it 'should work without errors' do
|
||||
pp = <<-EOS
|
||||
if $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemmajrelease, '16.00') > 0 {
|
||||
exec { 'simpleproc-create':
|
||||
command => 'mysql --database=mysql --delimiter="//" -NBe "CREATE PROCEDURE simpleproc (OUT param1 INT) BEGIN SELECT COUNT(*) INTO param1 FROM t; end//"',
|
||||
path => '/usr/bin/',
|
||||
before => Mysql_user['test2@tester'],
|
||||
}
|
||||
}
|
||||
mysql_user { 'test2@tester':
|
||||
ensure => present,
|
||||
}
|
||||
mysql_grant { 'test2@tester/PROCEDURE test.simpleproc':
|
||||
mysql_grant { 'test2@tester/PROCEDURE mysql.simpleproc':
|
||||
ensure => 'present',
|
||||
table => 'PROCEDURE test.simpleproc',
|
||||
table => 'PROCEDURE mysql.simpleproc',
|
||||
user => 'test2@tester',
|
||||
privileges => ['EXECUTE'],
|
||||
require => Mysql_user['test2@tester'],
|
||||
|
@ -429,7 +436,7 @@ describe 'mysql_grant' do
|
|||
|
||||
it 'should find the user' do
|
||||
shell("mysql -NBe \"SHOW GRANTS FOR test2@tester\"") do |r|
|
||||
expect(r.stdout).to match(/GRANT EXECUTE ON PROCEDURE `test`.`simpleproc` TO 'test2'@'tester'/)
|
||||
expect(r.stdout).to match(/GRANT EXECUTE ON PROCEDURE `mysql`.`simpleproc` TO 'test2'@'tester'/)
|
||||
expect(r.stderr).to be_empty
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue