@@ -268,51 +268,13 @@ class { 'mysql::server':
268
268
end
269
269
end
270
270
271
- # On Ubuntu 20.04 'ALL' now returns as the sum of it's constitute parts and so require a specific test
272
- describe 'ALL privilege on newer MySQL versions' , if : os [ :family ] == 'ubuntu' && os [ :release ] =~ %r{^20\. 04} do
273
- pp_one = <<-MANIFEST
274
- mysql_user { 'all@localhost':
275
- ensure => present,
276
- }
277
- mysql_grant { 'all@localhost/*.*':
278
- user => 'all@localhost',
279
- privileges => ['ALL'],
280
- table => '*.*',
281
- require => Mysql_user['all@localhost'],
282
- }
283
- MANIFEST
284
- it "create ['ALL'] privs" do
285
- apply_manifest ( pp_one , catch_failures : true )
286
- end
287
-
288
- pp_two = <<-MANIFEST
289
- mysql_user { 'all@localhost':
290
- ensure => present,
291
- }
292
- mysql_grant { 'all@localhost/*.*':
293
- user => 'all@localhost',
294
- privileges => ['ALTER', 'ALTER ROUTINE', 'CREATE', 'CREATE ROLE', 'CREATE ROUTINE', 'CREATE TABLESPACE', 'CREATE TEMPORARY TABLES', 'CREATE USER', 'CREATE VIEW', 'DELETE', 'DROP', 'DROP ROLE', 'EVENT', 'EXECUTE', 'FILE', 'INDEX', 'INSERT', 'LOCK TABLES', 'PROCESS', 'REFERENCES', 'RELOAD', 'REPLICATION CLIENT', 'REPLICATION SLAVE', 'SELECT', 'SHOW DATABASES', 'SHOW VIEW', 'SHUTDOWN', 'SUPER', 'TRIGGER', 'UPDATE'],
295
- table => '*.*',
296
- require => Mysql_user['all@localhost'],
297
- }
298
- MANIFEST
299
- it "create ['ALL'] constitute parts privs" do
300
- apply_manifest ( pp_two , catch_changes : true )
301
- end
302
- end
303
-
304
271
describe 'complex test' do
305
- # On Ubuntu 20.04 'ALL' now returns as the sum of it's constitute parts and so is no longer idempotent when set
306
- privileges = if os [ :family ] == 'ubuntu' && os [ :release ] =~ %r{^20\. 04}
307
- "['SELECT', 'INSERT', 'UPDATE']"
308
- else
309
- "['ALL']"
310
- end
311
272
pp = <<-MANIFEST
312
273
$dbSubnet = '10.10.10.%'
313
274
314
275
mysql_database { 'foo':
315
- ensure => present,
276
+ ensure => present,
277
+ charset => '#{ fetch_charset } ',
316
278
}
317
279
318
280
exec { 'mysql-create-table':
@@ -325,7 +287,7 @@ class { 'mysql::server':
325
287
Mysql_grant {
326
288
ensure => present,
327
289
options => ['GRANT'],
328
- privileges => #{ privileges } ,
290
+ privileges => ['ALL'] ,
329
291
table => '*.*',
330
292
require => [ Mysql_database['foo'], Exec['mysql-create-table'] ],
331
293
}
@@ -724,6 +686,7 @@ class { 'mysql::server': override_options => { 'root_password' => 'password' } }
724
686
user => 'root1',
725
687
password => 'password',
726
688
sql => '/tmp/grant_spec_table.sql',
689
+ charset => #{ fetch_charset } ,
727
690
}
728
691
MANIFEST
729
692
it 'creates table' do
0 commit comments