We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bcdb4d commit bfd74b9Copy full SHA for bfd74b9
1 file changed
controls/postgres_spec.rb
@@ -38,10 +38,16 @@
38
impact 1.0
39
title 'Postgresql should be running'
40
desc 'Postgresql should be running.'
41
- describe service(postgres.service) do
42
- it { should be_installed }
43
- it { should be_running }
44
- it { should be_enabled }
+ if os[:name] == "ubuntu"
+ describe command('/etc/init.d/postgresql status') do
+ its('stdout') { should include 'active' }
+ end
45
+ else
46
+ describe service(postgres.service) do
47
+ it { should be_installed }
48
+ it { should be_running }
49
+ it { should be_enabled }
50
51
end
52
53
0 commit comments