File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 432432 default: {
433433 $_granted_object = $_object_name
434434 $_togrant_object = $_object_name
435+ # if $_togrant_object_only not set, set it to a default value $_togrant_object
436+ # allows an Array or String to be passed as $_object_name i.e. [$schema, $table] or $table
437+ $_togrant_object_only = $_togrant_object
435438 }
436439 }
437440
449452
450453 $_onlyif = $onlyif_function ? {
451454 ' table_exists' => " SELECT true FROM pg_tables WHERE tablename = '${_togrant_object_only}'" ,
452- ' language_exists' => " SELECT true from pg_language WHERE lanname = '${_togrant_object_only}} '" ,
455+ ' language_exists' => " SELECT true from pg_language WHERE lanname = '${_togrant_object_only}'" ,
453456 ' role_exists' => " SELECT 1 FROM pg_roles WHERE rolname = '${role} ' or '${role} ' = 'PUBLIC'" ,
454- ' function_exists' => " SELECT true FROM pg_proc WHERE (oid::regprocedure)::text = '${_togrant_object_only}} ${arguments} '" ,
457+ ' function_exists' => " SELECT true FROM pg_proc WHERE (oid::regprocedure)::text = '${_togrant_object_only}${arguments} '" ,
455458 default => undef ,
456459 }
457460
Original file line number Diff line number Diff line change @@ -16,17 +16,9 @@ def unindent
1616RSpec . configure do |c |
1717 c . before :suite do
1818 install_dependencies
19- turn_off_strict_error
2019 end
2120end
2221
23- def turn_off_strict_error
24- # this is only temporary fix until we finish adding support for puppet 8
25- # strict=warning is defaulted on puppet versions below 8, whereas puppet 8 has strict=error by default
26- # error is caused by 'onlyif_exists' in spec/acceptance/server/grant_spec.rb L78 (works when removed, but not what we want to test)
27- LitmusHelper . instance . run_shell ( "echo 'strict=warning\n strict_variables=false' >> /etc/puppetlabs/puppet/puppet.conf" )
28- end
29-
3022def export_locales ( locale )
3123 LitmusHelper . instance . run_shell ( 'echo export PATH="/opt/puppetlabs/bin:$PATH" > ~/.bashrc' )
3224 LitmusHelper . instance . run_shell ( 'echo export LC_ALL="C" > /etc/profile.d/my-custom.lang.sh' )
You can’t perform that action at this time.
0 commit comments