File tree 2 files changed +5
-10
lines changed
2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 432
432
default: {
433
433
$_granted_object = $_object_name
434
434
$_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
435
438
}
436
439
}
437
440
449
452
450
453
$_onlyif = $onlyif_function ? {
451
454
' 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}'" ,
453
456
' 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} '" ,
455
458
default => undef ,
456
459
}
457
460
Original file line number Diff line number Diff line change @@ -16,17 +16,9 @@ def unindent
16
16
RSpec . configure do |c |
17
17
c . before :suite do
18
18
install_dependencies
19
- turn_off_strict_error
20
19
end
21
20
end
22
21
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
-
30
22
def export_locales ( locale )
31
23
LitmusHelper . instance . run_shell ( 'echo export PATH="/opt/puppetlabs/bin:$PATH" > ~/.bashrc' )
32
24
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