Sha256: d203f95a145496a731b534f829a717da81f51e83c0802a9e07763811b6789c4f
Contents?: true
Size: 1.65 KB
Versions: 5
Compression:
Stored size: 1.65 KB
Contents
require 'spec_helper' set :os, :family => 'base' describe commands.command_class('service').create do it { should be_an_instance_of(Specinfra::Command::Base::Service) } end 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
5 entries across 5 versions & 1 rubygems