Skip to content

Commit 6e96fe7

Browse files
committed
Add Debian/SLES service specs
Signed-off-by: Tim Smith <tsmith@chef.io>
1 parent 30ad80b commit 6e96fe7

2 files changed

Lines changed: 31 additions & 3 deletions

File tree

spec/unit/resource_cloning_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
describe 'test::resource_cloning_spec' do
44
let(:chef_run) do
5-
ChefSpec::ServerRunner.new(platform: 'centos', version: '6.9').converge(described_recipe)
5+
ChefSpec::SoloRunner.new(platform: 'centos', version: '6.9').converge(described_recipe)
66
end
77

88
it 'Create Directory with fake values, without cloning it' do

spec/unit/service_spec.rb

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
describe 'chef-client::service' do
44
context 'AIX' do
5-
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'aix', version: '7.1').converge(described_recipe) }
5+
let(:chef_run) { ChefSpec::SoloRunner.new(platform: 'aix', version: '7.1').converge(described_recipe) }
66
before do
77
stub_command('lssrc -s chef').and_return(true)
88
stub_command('lsitab chef').and_return(true)
@@ -37,6 +37,20 @@
3737
end
3838
end
3939

40+
context 'Debian 7' do
41+
let(:chef_run) { ChefSpec::SoloRunner.new(platform: 'debian', version: '7.11').converge(described_recipe) }
42+
it 'should use the systemd service' do
43+
expect(chef_run).to include_recipe('chef-client::init_service')
44+
end
45+
end
46+
47+
context 'Debian 8' do
48+
let(:chef_run) { ChefSpec::SoloRunner.new(platform: 'debian', version: '8.8').converge(described_recipe) }
49+
it 'should use the systemd service' do
50+
expect(chef_run).to include_recipe('chef-client::systemd_service')
51+
end
52+
end
53+
4054
context 'Fedora' do
4155
let(:chef_run) { ChefSpec::SoloRunner.new(platform: 'fedora', version: '25').converge(described_recipe) }
4256
it 'should use the systemd service' do
@@ -58,6 +72,20 @@
5872
end
5973
end
6074

75+
context 'SLES 11' do
76+
let(:chef_run) { ChefSpec::SoloRunner.new(platform: 'suse', version: '11.4').converge(described_recipe) }
77+
it 'should use the systemd service' do
78+
expect(chef_run).to include_recipe('chef-client::init_service')
79+
end
80+
end
81+
82+
context 'SLES 12' do
83+
let(:chef_run) { ChefSpec::SoloRunner.new(platform: 'suse', version: '12.2').converge(described_recipe) }
84+
it 'should use the systemd service' do
85+
expect(chef_run).to include_recipe('chef-client::systemd_service')
86+
end
87+
end
88+
6189
context 'openSUSE Leap' do
6290
let(:chef_run) { ChefSpec::SoloRunner.new(platform: 'opensuse', version: '42.2').converge(described_recipe) }
6391
it 'should use the systemd service' do
@@ -82,7 +110,7 @@
82110
end
83111

84112
context 'Solaris' do
85-
let(:chef_run) { ChefSpec::ServerRunner.new(platform: 'solaris2', version: '5.11').converge(described_recipe) }
113+
let(:chef_run) { ChefSpec::SoloRunner.new(platform: 'solaris2', version: '5.11').converge(described_recipe) }
86114
it 'should use the smf service' do
87115
expect(chef_run).to include_recipe('chef-client::smf_service')
88116
end

0 commit comments

Comments
 (0)