CentOS9: Fix unit tests related to use_xinetd
This is a follow-up of 053a3a2a56
and
fixes the expected unit test failures in CentOS9.
Change-Id: I3554e2dcea18c9bd07afc46925051e230d14f2c8
This commit is contained in:
@@ -7,7 +7,6 @@ describe 'swift::ringserver' do
|
||||
let :params do
|
||||
{ :local_net_ip => '127.0.0.1',
|
||||
:max_connections => 5,
|
||||
:rsync_use_xinetd => true,
|
||||
}
|
||||
end
|
||||
|
||||
@@ -43,7 +42,7 @@ describe 'swift::ringserver' do
|
||||
|
||||
it 'does create the rsync::server class' do
|
||||
is_expected.to contain_class('rsync::server').with({
|
||||
'use_xinetd' => 'true',
|
||||
'use_xinetd' => platform_params[:xinetd_available],
|
||||
'address' => '127.0.0.1',
|
||||
'use_chroot' => 'no'
|
||||
})
|
||||
@@ -70,6 +69,19 @@ describe 'swift::ringserver' do
|
||||
facts.merge(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
let (:platform_params) do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{ :xinetd_available => true }
|
||||
when 'RedHat'
|
||||
if facts[:operatingsystemmajrelease] > '8'
|
||||
{ :xinetd_available => false }
|
||||
else
|
||||
{ :xinetd_available => true }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like 'swift::ringserver'
|
||||
end
|
||||
end
|
||||
|
@@ -113,10 +113,9 @@ describe 'swift::storage::all' do
|
||||
)}
|
||||
|
||||
it { is_expected.to contain_class('rsync::server').with(
|
||||
{:use_xinetd => true,
|
||||
:use_xinetd => platform_params[:xinetd_available],
|
||||
:address => param_hash[:storage_local_net_ip],
|
||||
:use_chroot => 'no'
|
||||
}
|
||||
)}
|
||||
end
|
||||
end
|
||||
@@ -220,6 +219,19 @@ describe 'swift::storage::all' do
|
||||
facts.merge(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
let (:platform_params) do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{ :xinetd_available => true }
|
||||
when 'RedHat'
|
||||
if facts[:operatingsystemmajrelease] > '8'
|
||||
{ :xinetd_available => false }
|
||||
else
|
||||
{ :xinetd_available => true }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
it_configures 'swift::storage::all'
|
||||
|
||||
if facts[:osfamily] == 'Debian'
|
||||
|
@@ -15,10 +15,9 @@ describe 'swift::storage' do
|
||||
end
|
||||
|
||||
it { is_expected.to contain_class('rsync::server').with(
|
||||
{:use_xinetd => true,
|
||||
:use_xinetd => platform_params[:xinetd_available],
|
||||
:address => params[:storage_local_net_ip],
|
||||
:use_chroot => 'no'
|
||||
}
|
||||
)}
|
||||
end
|
||||
|
||||
@@ -62,6 +61,19 @@ describe 'swift::storage' do
|
||||
facts.merge(OSDefaults.get_facts())
|
||||
end
|
||||
|
||||
let (:platform_params) do
|
||||
case facts[:osfamily]
|
||||
when 'Debian'
|
||||
{ :xinetd_available => true }
|
||||
when 'RedHat'
|
||||
if facts[:operatingsystemmajrelease] > '8'
|
||||
{ :xinetd_available => false }
|
||||
else
|
||||
{ :xinetd_available => true }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
it_configures 'swift::storage'
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user