blob: a7911773621e60090c5eb20e25734344178b1f59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
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
|