Skip to content

Commit

Permalink
Merge pull request #341 from tuxmea/fix_sysvinit_conf
Browse files Browse the repository at this point in the history
Remove artefakt from sysvinit
  • Loading branch information
bastelfreak authored Oct 28, 2024
2 parents 6d5246b + 3315207 commit 102f4f0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
2 changes: 1 addition & 1 deletion functions/service_config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function wildfly::service_config(
{
'service_name' => 'jboss-eap',
'conf_file' => '/etc/default/jboss-eap.conf',
'conf_template' => 'wildfly/wildfly.sysvinit.conf',
'conf_template' => 'wildfly/wildfly.systemd.conf',
'service_file' => 'bin/init.d/jboss-eap-rhel.sh',
'systemd_template' => 'wildfly/jboss-eap.systemd.service',
}
Expand Down
23 changes: 0 additions & 23 deletions spec/classes/service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,6 @@
end

if os_facts[:osfamily] == 'RedHat'
context 'use RedHat init script' do
let(:facts) do
os_facts.merge(
{
:initsystem => 'sysvinit',
}
)
end

it { is_expected.to contain_class('wildfly::service::sysvinit') }

it { is_expected.to contain_file('/etc/default/wildfly.conf') }
it { is_expected.to contain_file('/etc/init.d/wildfly') }
it do
is_expected.to contain_service('wildfly').with(
'ensure' => true,
'hasrestart' => true,
'hasstatus' => true
)
end
it { is_expected.to contain_file('/etc/init.d/wildfly').with_source('/opt/wildfly/bin/init.d/wildfly-init-redhat.sh') }
end

context 'use RedHat systemd script' do
it { is_expected.to contain_class('wildfly::service::systemd') }
it { is_expected.to contain_file('/etc/default/wildfly.conf') }
Expand Down
2 changes: 1 addition & 1 deletion spec/functions/service_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
let(:version) { '7.0' }

it 'using systemd' do
is_expected.to run.with_params(distribution, version, 'standalone').and_return('service_file' => 'bin/init.d/jboss-eap-rhel.sh', 'conf_file' => '/etc/default/jboss-eap.conf', 'service_name' => 'jboss-eap', 'conf_template' => 'wildfly/wildfly.sysvinit.conf', 'systemd_template' => 'wildfly/jboss-eap.systemd.service')
is_expected.to run.with_params(distribution, version, 'standalone').and_return('service_file' => 'bin/init.d/jboss-eap-rhel.sh', 'conf_file' => '/etc/default/jboss-eap.conf', 'service_name' => 'jboss-eap', 'conf_template' => 'wildfly/wildfly.systemd.conf', 'systemd_template' => 'wildfly/jboss-eap.systemd.service')
end
end
end

0 comments on commit 102f4f0

Please sign in to comment.