Skip to content

Commit

Permalink
Merge pull request voxpupuli#921 from wyardley/fix_service_calls_issu…
Browse files Browse the repository at this point in the history
…e_916

Remove broken configtest_enable option
  • Loading branch information
bastelfreak authored Oct 12, 2016
2 parents 5a722b5 + d85ff88 commit b22a176
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 41 deletions.
12 changes: 4 additions & 8 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,8 @@
### END Package Configuration ###

### START Service Configuation ###
$configtest_enable = false,
$service_ensure = running,
$service_flags = undef,
$service_restart = '/etc/init.d/nginx reload',
$service_name = undef,
$service_manage = true,
### END Service Configuration ###
Expand Down Expand Up @@ -305,12 +303,10 @@
Class['::nginx::package'] -> Class['::nginx::config'] ~> Class['::nginx::service']

class { '::nginx::service':
configtest_enable => $configtest_enable,
service_ensure => $service_ensure,
service_restart => $service_restart,
service_name => $service_name,
service_flags => $service_flags,
service_manage => $service_manage,
service_ensure => $service_ensure,
service_name => $service_name,
service_flags => $service_flags,
service_manage => $service_manage,
}

create_resources('nginx::resource::upstream', $nginx_upstreams)
Expand Down
7 changes: 0 additions & 7 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
#
# This class file is not called directly
class nginx::service(
$configtest_enable = false,
$service_restart = '/etc/init.d/nginx reload',
$service_ensure = 'running',
$service_name = 'nginx',
$service_flags = undef,
Expand Down Expand Up @@ -60,9 +58,4 @@
}
}

if $configtest_enable == true {
Service['nginx'] {
restart => $service_restart,
}
}
}
26 changes: 0 additions & 26 deletions spec/classes/service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
describe 'nginx::service' do
let :params do
{
configtest_enable: false,
service_restart: '/etc/init.d/nginx reload',
service_ensure: 'running',
service_name: 'nginx',
service_manage: true
Expand All @@ -23,30 +21,6 @@
it { is_expected.to contain_service('nginx').without_restart }
end

describe 'when configtest_enable => true' do
let :params do
{
configtest_enable: true,
service_restart: '/etc/init.d/nginx reload',
service_ensure: 'running',
service_name: 'nginx'
}
end
it { is_expected.to contain_service('nginx').with_restart('/etc/init.d/nginx reload') }

context "when service_restart => 'a restart command'" do
let :params do
{
configtest_enable: true,
service_restart: 'a restart command',
service_ensure: 'running',
service_name: 'nginx'
}
end
it { is_expected.to contain_service('nginx').with_restart('a restart command') }
end
end

describe "when service_name => 'nginx14" do
let :params do
{
Expand Down

0 comments on commit b22a176

Please sign in to comment.