Sha256: e3e8e5c94c451642f919502077878124f348505420f22b045fbda8d6b76523fa

Contents?: true

Size: 1.45 KB

Versions: 14

Compression:

Stored size: 1.45 KB

Contents

only_if do
  os["family"] == "windows"
end

describe command("chef-service-manager") do
  it { should exist }
  its("exit_status") { should eq 0 }
end

describe service("chef-client") do
  it { should_not be_enabled }
  it { should_not be_installed }
  it { should_not be_running }
end

describe command("chef-service-manager -a install") do
  its("exit_status") { should eq 0 }
  its(:stdout) { should match /Service 'chef-client' has successfully been installed./ }
end

describe service("chef-client") do
  it { should be_enabled }
  it { should be_installed }
  it { should_not be_running }
end

describe command("chef-service-manager -a start") do
  its("exit_status") { should eq 0 }
  its(:stdout) { should match /Service 'chef-client' is now 'running'/ }
end

describe service("chef-client") do
  it { should be_enabled }
  it { should be_installed }
  it { should be_running }
end

describe command("chef-service-manager -a stop") do
  its("exit_status") { should eq 0 }
  its(:stdout) { should match /Service 'chef-client' is now 'stopped'/ }
end

describe service("chef-client") do
  it { should be_enabled }
  it { should be_installed }
  it { should_not be_running }
end

describe command("chef-service-manager -a uninstall") do
  its("exit_status") { should eq 0 }
  its(:stdout) { should match /Service chef-client deleted/ }
end

describe service("chef-client") do
  it { should_not be_enabled }
  it { should_not be_installed }
  it { should_not be_running }
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
chef-12.12.15-universal-mingw32 acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb
chef-12.12.15 acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb
chef-12.12.13 acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb
chef-12.12.13-universal-mingw32 acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb
chef-12.11.18-universal-mingw32 acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb
chef-12.11.18 acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb
chef-12.10.24 acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb
chef-12.10.24-universal-mingw32 acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb
chef-12.9.41 acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb
chef-12.9.41-universal-mingw32 acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb
chef-12.9.38 acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb
chef-12.9.38-universal-mingw32 acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb
chef-12.7.2 acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb
chef-12.7.2-universal-mingw32 acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb