@@ -321,7 +321,7 @@ class { 'postgresql::server': }
321321 it 'should grant select on a table to a user' do
322322 begin
323323 pp = pp_create_table + <<-EOS . unindent
324-
324+
325325 postgresql::server::grant { 'grant select on test_tbl':
326326 privilege => 'SELECT',
327327 object_type => 'TABLE',
@@ -334,7 +334,7 @@ class { 'postgresql::server': }
334334 EOS
335335
336336 pp_revoke = pp_create_table + <<-EOS . unindent
337-
337+
338338 postgresql::server::grant { 'revoke select on test_tbl':
339339 ensure => absent,
340340 privilege => 'SELECT',
@@ -346,17 +346,17 @@ class { 'postgresql::server': }
346346 Postgresql::Server::Role[$user], ]
347347 }
348348 EOS
349-
349+
350350 apply_manifest ( pp_install , :catch_failures => true )
351-
351+
352352 #postgres version
353353 result = shell ( 'psql --version' )
354354 version = result . stdout . match ( %r{\s (\d \. \d )} ) [ 1 ]
355-
355+
356356 if version >= '9.0'
357357 apply_manifest ( pp , :catch_failures => true )
358358 apply_manifest ( pp , :catch_changes => true )
359-
359+
360360 ## Check that the privilege was granted to the user
361361 psql ( "-d #{ db } --tuples-only --command=\" SELECT * FROM has_table_privilege('#{ user } ', 'test_tbl', 'SELECT')\" " , user ) do |r |
362362 expect ( r . stdout ) . to match ( /t/ )
@@ -374,11 +374,11 @@ class { 'postgresql::server': }
374374 end
375375 end
376376 end
377-
377+
378378 it 'should grant update on all tables to a user' do
379379 begin
380380 pp = pp_create_table + <<-EOS . unindent
381-
381+
382382 postgresql::server::grant { 'grant update on all tables':
383383 privilege => 'UPDATE',
384384 object_type => 'ALL TABLES IN SCHEMA',
@@ -391,7 +391,7 @@ class { 'postgresql::server': }
391391 EOS
392392
393393 pp_revoke = pp_create_table + <<-EOS . unindent
394-
394+
395395 postgresql::server::grant { 'revoke update on all tables':
396396 ensure => absent,
397397 privilege => 'UPDATE',
@@ -403,17 +403,17 @@ class { 'postgresql::server': }
403403 Postgresql::Server::Role[$user], ]
404404 }
405405 EOS
406-
406+
407407 apply_manifest ( pp_install , :catch_failures => true )
408-
408+
409409 #postgres version
410410 result = shell ( 'psql --version' )
411411 version = result . stdout . match ( %r{\s (\d \. \d )} ) [ 1 ]
412-
412+
413413 if version >= '9.0'
414414 apply_manifest ( pp , :catch_failures => true )
415415 apply_manifest ( pp , :catch_changes => true )
416-
416+
417417 ## Check that all privileges were granted to the user
418418 psql ( "-d #{ db } --command=\" SELECT table_name,privilege_type FROM information_schema.role_table_grants
419419 WHERE grantee = '#{ user } ' AND table_schema = 'public'\" " , user ) do |r |
@@ -437,7 +437,7 @@ class { 'postgresql::server': }
437437 it 'should grant all on all tables to a user' do
438438 begin
439439 pp = pp_create_table + <<-EOS . unindent
440-
440+
441441 postgresql::server::grant { 'grant all on all tables':
442442 privilege => 'ALL',
443443 object_type => 'ALL TABLES IN SCHEMA',
@@ -450,7 +450,7 @@ class { 'postgresql::server': }
450450 EOS
451451
452452 pp_revoke = pp_create_table + <<-EOS . unindent
453-
453+
454454 postgresql::server::grant { 'revoke all on all tables':
455455 ensure => absent,
456456 privilege => 'ALL',
@@ -462,17 +462,17 @@ class { 'postgresql::server': }
462462 Postgresql::Server::Role[$user], ]
463463 }
464464 EOS
465-
465+
466466 apply_manifest ( pp_install , :catch_failures => true )
467-
467+
468468 #postgres version
469469 result = shell ( 'psql --version' )
470470 version = result . stdout . match ( %r{\s (\d \. \d )} ) [ 1 ]
471-
471+
472472 if version >= '9.0'
473473 apply_manifest ( pp , :catch_failures => true )
474474 apply_manifest ( pp , :catch_changes => true )
475-
475+
476476 ## Check that all privileges were granted to the user
477477 psql ( "-d #{ db } --tuples-only --command=\" SELECT table_name,count(privilege_type) FROM information_schema.role_table_grants
478478 WHERE grantee = '#{ user } ' AND table_schema = 'public'
0 commit comments