Skip to content

Commit d82efa0

Browse files
committed
Fixed tests
1 parent f1b1618 commit d82efa0

File tree

2 files changed

+1
-42
lines changed

2 files changed

+1
-42
lines changed

manifests/conf.pp.erb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ define <%= metadata.name %>::conf (
102102
default => $require,
103103
}
104104

105-
$manage_notify = $notify ? {
106-
undef => $<%= metadata.name %>::manage_config_file_notify,
107-
default => $notify,
108-
}
109-
110105
$manage_replace = $replace ? {
111106
undef => $<%= metadata.name %>::config_file_replace,
112107
default => $replace,
@@ -121,7 +116,7 @@ define <%= metadata.name %>::conf (
121116
owner => $manage_owner,
122117
group => $manage_group,
123118
require => $manage_require,
124-
notify => $manage_notify,
119+
notify => $notify,
125120
replace => $manage_replace,
126121
}
127122

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',
@@ -85,27 +70,6 @@ describe '<%= metadata.name %>' do
8570
it { should contain_file('<%= metadata.name %>.dir').with_force('true') }
8671
end
8772

88-
describe "#{osfamily} Service restart on config file change (default)" do
89-
let(:facts) {{
90-
:osfamily => osfamily,
91-
}}
92-
it 'should automatically restart the service when files change' do
93-
should contain_file('<%= metadata.name %>.conf').with_notify('Service[<%= metadata.name %>]')
94-
end
95-
end
96-
97-
describe "#{osfamily} Service restart disabling on config file change" do
98-
let(:params) { {
99-
:config_file_notify => '',
100-
} }
101-
let(:facts) {{
102-
:osfamily => osfamily,
103-
}}
104-
it 'should automatically restart the service when files change' do
105-
should contain_file('<%= metadata.name %>.conf').without_notify
106-
end
107-
end
108-
10973
end
11074
end
11175

0 commit comments

Comments
 (0)