Sha256: fcaf3cf8e072023476acbf1a8f44a79c9c16b2e3daf73eb2dd47421e79d50d63
Contents?: true
Size: 1.53 KB
Versions: 2
Compression:
Stored size: 1.53 KB
Contents
require 'spec_helper' set :os, :family => 'base' describe service('sshd') do it { should be_running } end describe service('invalid-daemon') do it { should_not be_running } end describe service('sshd') do let(:stdout) { "sshd is stopped\r\n" } it { should be_running } end describe service('sshd') do it { should be_running.under('supervisor') } end describe service('invalid-daemon') do it { should_not be_running.under('supervisor') } end describe service('sshd') do it { should be_running.under('upstart') } end describe service('invalid-daemon') do it { should_not be_running.under('upstart') } end describe service('sshd') do it { expect { should be_running.under('not implemented') }.to raise_error(Specinfra::Command::Base::NotImplementedError) } end describe service('sshd') do let(:stdout) { "Process 'sshd'\r\n status running\r\n monitoring status monitored" } it { should be_monitored_by('monit') } end describe service('sshd') do let(:stdout) { "Process 'sshd'\r\n status not monitored\r\n monitoring status not monitored" } 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') } end describe service('invalid-daemon') do it { should_not be_monitored_by('god') } end describe service('sshd') do it { expect { should be_monitored_by('not implemented') }.to raise_error(Specinfra::Command::Base::NotImplementedError) } end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
serverspec-2.0.0.beta15 | spec/type/base/service_spec.rb |
serverspec-2.0.0.beta14 | spec/type/base/service_spec.rb |