Skip to content

Commit e52d00e

Browse files
committed
remove the sudo command and remove duplicate control
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
1 parent f462731 commit e52d00e

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

controls/postgres_spec.rb

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@
7777
impact 1.0
7878
title 'Use stable postgresql version'
7979
desc 'Use only community or commercially supported version of the PostgreSQL software. Do not use RC, DEVEL oder BETA versions in a production environment.'
80-
describe command('sudo -i psql -V') do
80+
describe command('psql -V') do
8181
its('stdout') { should match(/9.[2-5]/) }
8282
end
83-
describe command('sudo -i psql -V') do
83+
describe command('psql -V') do
8484
its('stdout') { should_not match(/RC/) }
8585
its('stdout') { should_not match(/DEVEL/) }
8686
its('stdout') { should_not match(/BETA/) }
@@ -235,16 +235,7 @@
235235
impact 1.0
236236
title 'We accept one peer and one ident for now (chef automation)'
237237
desc 'We accept one peer and one ident for now (chef automation)'
238-
describe command('sudo -i cat ' + POSTGRES_HBA_CONF_FILE + ' | egrep \'peer|ident\' | wc -l') do
239-
its('stdout') { should match(/^[2|1]/) }
240-
end
241-
end
242-
243-
control 'postgres-14' do
244-
impact 1.0
245-
title 'We accept one peer and one ident for now (chef automation)'
246-
desc 'We accept one peer and one ident for now (chef automation)'
247-
describe command('sudo -i cat ' + POSTGRES_HBA_CONF_FILE + ' | egrep \'peer|ident\' | wc -l') do
238+
describe command('cat ' + POSTGRES_HBA_CONF_FILE + ' | egrep \'peer|ident\' | wc -l') do
248239
its('stdout') { should match(/^[2|1]/) }
249240
end
250241
end

0 commit comments

Comments
 (0)