Skip to content

Commit 16f93a3

Browse files
d1nuc0mbastelfreak
authored andcommitted
fix: remove puppet_litmus helpers
idempotent_apply is a puppet_litmus helper
1 parent 2174ba4 commit 16f93a3

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

spec/acceptance/standalone_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@
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

spec/support/acceptance/shared/puppetdb.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

spec/support/acceptance/shared/puppetserver.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
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
910
end

0 commit comments

Comments
 (0)