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 195
195
end
196
196
end
197
197
198
+ context 'with a role defined' do
199
+ let :params do
200
+ {
201
+ :db => 'test' ,
202
+ :role => 'test' ,
203
+ :privilege => 'all' ,
204
+ :object_name => [ 'myschema' , 'mytable' ] ,
205
+ :object_type => 'table' ,
206
+ }
207
+ end
208
+
209
+ let :pre_condition do
210
+ <<-EOS
211
+ class {'postgresql::server':}
212
+ postgresql::server::role { 'test': }
213
+ EOS
214
+ end
215
+
216
+ it { is_expected . to compile . with_all_deps }
217
+ it { is_expected . to contain_postgresql__server__grant ( 'test' ) }
218
+ it { is_expected . to contain_postgresql__server__role ( 'test' ) }
219
+ it do
220
+ is_expected . to contain_postgresql_psql ( 'grant:test' ) . \
221
+ that_requires ( 'Postgresql::Server::Role[test]' )
222
+ end
223
+ end
224
+
198
225
context 'invalid object_type' do
199
226
let :params do
200
227
{
You can’t perform that action at this time.
0 commit comments