Add system test to cover procedure creation scenario
This commit is contained in:
parent
ce7b661f10
commit
4f12b0c7f9
1 changed files with 22 additions and 0 deletions
|
@ -283,4 +283,26 @@ describe 'mysql_grant' do
|
||||||
expect(apply_manifest(pp, :catch_failures => true).exit_code).to eq(0)
|
expect(apply_manifest(pp, :catch_failures => true).exit_code).to eq(0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'adding procedure privileges' do
|
||||||
|
it 'should work without errors' do
|
||||||
|
pp = <<-EOS
|
||||||
|
mysql_grant { 'test2@tester/PROCEDURE test.simpleproc':
|
||||||
|
ensure => 'present',
|
||||||
|
table => 'PROCEDURE test.simpleproc',
|
||||||
|
user => 'test2@tester',
|
||||||
|
privileges => ['EXECUTE'],
|
||||||
|
}
|
||||||
|
EOS
|
||||||
|
|
||||||
|
apply_manifest(pp, :catch_failures => true)
|
||||||
|
end
|
||||||
|
|
||||||
|
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.stderr).to be_empty
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue