spec/redhat/service_spec.rb in serverspec-0.6.26 vs spec/redhat/service_spec.rb in serverspec-0.6.27
- old
+ new
@@ -34,26 +34,22 @@
it { should be_running }
end
describe service('sshd') do
it { should be_running.under('supervisor') }
+ its(:command) { should eq "supervisorctl status sshd | grep RUNNING" }
end
describe service('invalid-daemon') do
it { should_not be_running.under('supervisor') }
end
describe service('sshd') do
- let(:stdout) { "sshd running\r\n" }
it { should be_running.under('upstart') }
+ its(:command) { should eq "initctl status sshd | grep running" }
end
-describe service('sshd') do
- let(:stdout) { "sshd waiting\r\n" }
- it { should_not be_running.under('upstart') }
-end
-
describe service('invalid-daemon') do
it { should_not be_running.under('upstart') }
end
describe service('sshd') do
@@ -75,9 +71,18 @@
it { should_not be_monitored_by('monit') }
end
describe service('invalid-daemon') do
it { should_not be_monitored_by('monit') }
+end
+
+describe service('unicorn') do
+ it { should be_monitored_by('god') }
+ its(:command) { should eq "god status unicorn" }
+end
+
+describe service('invalid-daemon') do
+ it { should_not be_monitored_by('god') }
end
describe service('sshd') do
it {
expect {