File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 187
187
end
188
188
end
189
189
190
+ context 'with a role defined' do
191
+ let :params do
192
+ {
193
+ db : 'test' ,
194
+ role : 'test' ,
195
+ privilege : 'all' ,
196
+ object_name : %w[ myschema mytable ] ,
197
+ object_type : 'table' ,
198
+ }
199
+ end
200
+
201
+ let :pre_condition do
202
+ <<-EOS
203
+ class {'postgresql::server':}
204
+ postgresql::server::role { 'test': }
205
+ EOS
206
+ end
207
+
208
+ it { is_expected . to compile . with_all_deps }
209
+ it { is_expected . to contain_postgresql__server__grant ( 'test' ) }
210
+ it { is_expected . to contain_postgresql__server__role ( 'test' ) }
211
+ it do
212
+ is_expected . to contain_postgresql_psql ( 'grant:test' ) \
213
+ . that_requires ( 'Postgresql::Server::Role[test]' )
214
+ end
215
+ end
216
+
190
217
context 'invalid object_type' do
191
218
let :params do
192
219
{
You can’t perform that action at this time.
0 commit comments