diff --git a/functions/service_config.pp b/functions/service_config.pp index 7d76506..2c041f2 100644 --- a/functions/service_config.pp +++ b/functions/service_config.pp @@ -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', } diff --git a/spec/classes/service_spec.rb b/spec/classes/service_spec.rb index e25ccf2..df06ab6 100644 --- a/spec/classes/service_spec.rb +++ b/spec/classes/service_spec.rb @@ -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') } diff --git a/spec/functions/service_config_spec.rb b/spec/functions/service_config_spec.rb index 47e3aff..811c3a1 100644 --- a/spec/functions/service_config_spec.rb +++ b/spec/functions/service_config_spec.rb @@ -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