Sha256: b054e595104b47f275953a065bcb3fa157673da46bd914a1eae4bcd446e4bdc5

Contents?: true

Size: 1.11 KB

Versions: 9

Compression:

Stored size: 1.11 KB

Contents

require 'spec_helper'

set :os, :family => 'base'

describe service('sshd') do
  it { should 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('sshd') do
  it { should be_running.under(:upstart) }
end

describe service('sshd') do
  it { should be_running.under(:daemontools) }
end

describe service('sshd') do
  it {
    expect {
      should be_running.under('not implemented')
    }.to raise_exception
  }
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('tinc') do
  let(:stdout) { "Process 'tinc-myvpn'\r\n  status running\r\n  monitoring status  monitored" }
  it { should be_monitored_by(:monit).with_name('tinc-myvpn') }
end

describe service('unicorn') do
  it { should be_monitored_by(:god) }
end

describe service('sshd') do
  it {
    expect {
      should be_monitored_by('not implemented')
    }.to raise_exception
  }
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
serverspec-2.36.0 spec/type/base/service_spec.rb
serverspec-2.35.0 spec/type/base/service_spec.rb
serverspec-2.34.0 spec/type/base/service_spec.rb
serverspec-2.33.0 spec/type/base/service_spec.rb
serverspec-2.32.0 spec/type/base/service_spec.rb
serverspec-2.31.1 spec/type/base/service_spec.rb
serverspec-2.31.0 spec/type/base/service_spec.rb
serverspec-2.30.1 spec/type/base/service_spec.rb
serverspec-2.30.0 spec/type/base/service_spec.rb