File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
support/acceptance/shared Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 2626
2727 context 'puppetdb postgres user' , :status do
2828 it 'is not allowing read-only user to create tables' do
29- run_shell ( 'psql "postgresql://puppetdb-read:puppetdb-read@localhost/puppetdb" -c "create table tables(id int)"' , expect_failures : true ) do | r |
30- expect ( r . stderr ) . to match ( %r{^ERROR: permission denied for schema public.*} )
31- expect ( r . exit_code ) . to eq 1
29+ command ( 'psql "postgresql://puppetdb-read:puppetdb-read@localhost/puppetdb" -c "create table tables(id int)"' ) do
30+ its ( : stderr) { is_expected . to match %r{^ERROR: permission denied for schema public.*} }
31+ its ( :exit_status ) { is_expected . to eq 1 }
3232 end
3333 end
3434
3535 it 'is allowing normal user to manage schema' do
36- run_shell ( 'psql "postgresql://puppetdb:puppetdb@localhost/puppetdb" -c "create table testing(id int); drop table testing"' ) do | r |
37- expect ( r . exit_status ) . to eq 0
36+ command ( 'psql "postgresql://puppetdb:puppetdb@localhost/puppetdb" -c "create table testing(id int); drop table testing"' ) do
37+ its ( : exit_status) { is_expected . to eq 0 }
3838 end
3939 end
4040
4141 it 'is allowing read-only user to select' do
42- run_shell ( 'psql "postgresql://puppetdb-read:puppetdb-read@localhost/puppetdb" -c "select * from catalogs limit 1"' ) do | r |
43- expect ( r . exit_status ) . to eq 0
42+ command ( 'psql "postgresql://puppetdb-read:puppetdb-read@localhost/puppetdb" -c "select * from catalogs limit 1"' ) do
43+ its ( : exit_status) { is_expected . to eq 0 }
4444 end
4545 end
4646 end
Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ class { 'puppetdb':
4343 end
4444
4545 it 'applies idempotently' do
46- idempotent_apply ( pp , debug : ENV . key? ( 'DEBUG' ) )
46+ apply_manifest ( pp , expect_failures : false , debug : ENV . key? ( 'DEBUG' ) )
47+ apply_manifest ( pp , expect_failures : false , debug : ENV . key? ( 'DEBUG' ) )
4748 end
4849
4950 it 'agent can puppetdb_query' do
Original file line number Diff line number Diff line change 44 let ( :pp ) { File . read ( File . join ( File . dirname ( __FILE__ ) , 'puppetserver.pp' ) ) }
55
66 it 'applies idempotently' do
7- idempotent_apply ( pp , debug : ENV . key? ( 'DEBUG' ) )
7+ apply_manifest ( pp , expect_failures : false , debug : ENV . key? ( 'DEBUG' ) )
8+ apply_manifest ( pp , expect_failures : false , debug : ENV . key? ( 'DEBUG' ) )
89 end
910end
You can’t perform that action at this time.
0 commit comments