Sha256: 6486b368b372fa66f4699e62a7c075ef41bed3aa6d0b2fdc300fd5987e1ebf39

Contents?: true

Size: 1.16 KB

Versions: 24

Compression:

Stored size: 1.16 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_error(/is not implemented in Specinfra/)
  }
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_error(NotImplementedError)
  }
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
serverspec-2.42.3 spec/type/base/service_spec.rb
serverspec-2.42.2 spec/type/base/service_spec.rb
serverspec-2.42.1 spec/type/base/service_spec.rb
serverspec-cem-acpt-2.42.0 spec/type/base/service_spec.rb
serverspec-2.42.0 spec/type/base/service_spec.rb
serverspec-2.41.8 spec/type/base/service_spec.rb
serverspec-2.41.7 spec/type/base/service_spec.rb
serverspec-2.41.6 spec/type/base/service_spec.rb
serverspec-2.41.5 spec/type/base/service_spec.rb
serverspec-2.41.4 spec/type/base/service_spec.rb
serverspec-2.41.3 spec/type/base/service_spec.rb
serverspec-2.41.2 spec/type/base/service_spec.rb
serverspec-2.41.1 spec/type/base/service_spec.rb
serverspec-2.41.0 spec/type/base/service_spec.rb
serverspec-2.40.0 spec/type/base/service_spec.rb
serverspec-2.39.2 spec/type/base/service_spec.rb
serverspec-2.39.1 spec/type/base/service_spec.rb
serverspec-2.39.0 spec/type/base/service_spec.rb
serverspec-2.38.1 spec/type/base/service_spec.rb
serverspec-2.38.0 spec/type/base/service_spec.rb