Skip to content

Commit fbb0534

Browse files
committed
Updates spec tests
1 parent 86476bf commit fbb0534

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

data/common.yaml.erb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
package_name: '<%= metadata.name %>'
3-
service_name: '<%= metadata.name %>'
43
config_file_path: '/etc/<%= metadata.name %>/<%= metadata.name %>.conf'
54
config_file_mode: '0644'
65
config_file_owner: 'root'

spec/classes/init_spec.rb.erb

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ describe '<%= metadata.name %>' do
1010
:osfamily => osfamily,
1111
}}
1212
it { should contain_package('<%= metadata.name %>').with_ensure('present') }
13-
it { should contain_service('<%= metadata.name %>').with_ensure('running') }
1413
end
1514

1615
describe "#{osfamily} installation of a specific package version" do
@@ -31,23 +30,9 @@ describe '<%= metadata.name %>' do
3130
:osfamily => osfamily,
3231
}}
3332
it 'should remove Package[<%= metadata.name %>]' do should contain_package('<%= metadata.name %>').with_ensure('absent') end
34-
it 'should stop Service[<%= metadata.name %>]' do should contain_service('<%= metadata.name %>').with_ensure('stopped') end
35-
it 'should not manage at boot Service[<%= metadata.name %>]' do should contain_service('<%= metadata.name %>').with_enable(nil) end
3633
it 'should remove <%= metadata.name %> configuration file' do should contain_file('<%= metadata.name %>.conf').with_ensure('absent') end
3734
end
3835

39-
describe "#{osfamily} service disabling" do
40-
let(:params) { {
41-
:service_ensure => 'stopped',
42-
:service_enable => false,
43-
} }
44-
let(:facts) {{
45-
:osfamily => osfamily,
46-
}}
47-
it 'should stop Service[<%= metadata.name %>]' do should contain_service('<%= metadata.name %>').with_ensure('stopped') end
48-
it 'should not enable at boot Service[<%= metadata.name %>]' do should contain_service('<%= metadata.name %>').with_enable('false') end
49-
end
50-
5136
describe "#{osfamily} configuration via custom template" do
5237
let(:params) { {
5338
:config_file_template => '<%= metadata.name %>/spec.conf',
@@ -95,27 +80,6 @@ describe '<%= metadata.name %>' do
9580
it { should contain_file('<%= metadata.name %>.dir').with_force('true') }
9681
end
9782

98-
describe "#{osfamily} service restart on config file change (default)" do
99-
let(:facts) {{
100-
:osfamily => osfamily,
101-
}}
102-
it 'should automatically restart the service when files change' do
103-
should contain_file('<%= metadata.name %>.conf').with_notify('Service[<%= metadata.name %>]')
104-
end
105-
end
106-
107-
describe "#{osfamily} service restart disabling on config file change" do
108-
let(:params) { {
109-
:config_file_notify => '',
110-
} }
111-
let(:facts) {{
112-
:osfamily => osfamily,
113-
}}
114-
it 'should automatically restart the service when files change' do
115-
should contain_file('<%= metadata.name %>.conf').without_notify
116-
end
117-
end
118-
11983
end
12084
end
12185

0 commit comments

Comments
 (0)