Sha256: 8765c4606ba11f8d7ed68881028b11b78e0bd676f007c0946bce8a4bdb0d8323

Contents?: true

Size: 874 Bytes

Versions: 42

Compression:

Stored size: 874 Bytes

Contents

require 'spec_helper'

include SpecInfra::Helper::Cmd
include SpecInfra::Helper::Windows

describe service('Test Service') do
  it { should be_enabled }
  its(:command) { should eq "(FindService -name 'Test Service').StartMode -eq 'Auto'" }
end

describe service('invalid-service') do
  it { should_not be_enabled }
end

describe service('Test Service') do
  it { should be_running }
  its(:command) { should eq "(FindService -name 'Test Service').State -eq 'Running'" }
end

describe service('invalid-daemon') do
  it { should_not be_running }
end

describe service('Test service') do
  it "should raise error if trying to check service process controller" do
   expect { should be_running.under('supervisor') }.to raise_error
 end
  it "should raise error if trying to check service monitoring" do
   expect { should_not be_monitored_by('monit') }.to raise_error
 end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
serverspec-1.16.0 spec/windows/service_spec.rb
serverspec-1.15.0 spec/windows/service_spec.rb
serverspec-1.14.0 spec/windows/service_spec.rb
serverspec-1.13.0 spec/windows/service_spec.rb
serverspec-1.12.0 spec/windows/service_spec.rb
serverspec-1.11.0 spec/windows/service_spec.rb
serverspec-1.10.0 spec/windows/service_spec.rb
serverspec-1.9.1 spec/windows/service_spec.rb
serverspec-1.9.0 spec/windows/service_spec.rb
serverspec-1.8.0 spec/windows/service_spec.rb
serverspec-1.7.1 spec/windows/service_spec.rb
serverspec-1.7.0 spec/windows/service_spec.rb
serverspec-1.6.0 spec/windows/service_spec.rb
serverspec-1.5.0 spec/windows/service_spec.rb
serverspec-1.4.2 spec/windows/service_spec.rb
serverspec-1.4.1 spec/windows/service_spec.rb
serverspec-1.4.0 spec/windows/service_spec.rb
serverspec-1.3.0 spec/windows/service_spec.rb
serverspec-1.2.0 spec/windows/service_spec.rb
serverspec-1.1.0 spec/windows/service_spec.rb