Merge "Remove usage of custom os_package_type fact"

This commit is contained in:
Zuul 2022-01-07 21:21:27 +00:00 committed by Gerrit Code Review
commit e888297867
5 changed files with 5 additions and 13 deletions

View File

@ -760,7 +760,7 @@ and usage of a quoted value is deprecated.')
if $compress_offline {
Concat<| tag == 'django-config' |> ~> Exec['refresh_horizon_django_compress']
if $::os_package_type == 'rpm' {
if $::osfamily == 'RedHat' {
Concat<| tag == 'django-config' |> ~> Exec['refresh_horizon_django_cache'] -> Exec['refresh_horizon_django_compress']
}
}

View File

@ -38,8 +38,8 @@ class horizon::params {
$heat_dashboard_package_name = 'python3-heat-dashboard'
$manila_dashboard_package_name = 'python3-manila-dashboard'
$octavia_dashboard_package_name = 'python3-octavia-dashboard'
case $::os_package_type {
'debian': {
case $::operatingsystem {
'Debian': {
$package_name = 'openstack-dashboard-apache'
$httpd_config_file = '/etc/apache2/sites-available/openstack-dashboard-alias-only.conf'
}

View File

@ -32,7 +32,7 @@ describe 'horizon' do
:refreshonly => true,
})}
it {
if facts[:os_package_type] == 'rpm'
if facts[:osfamily] == 'RedHat'
is_expected.to contain_concat(platforms_params[:config_file]).that_notifies('Exec[refresh_horizon_django_cache]')
is_expected.to contain_concat(platforms_params[:config_file]).that_notifies('Exec[refresh_horizon_django_compress]')
else
@ -767,7 +767,7 @@ describe 'horizon' do
let(:platforms_params) do
case facts[:osfamily]
when 'Debian'
if facts[:os_package_type] == 'debian'
if facts[:operatingsystem] == 'Debian'
{ :config_file => '/etc/openstack-dashboard/local_settings.py',
:conf_d_dir => '/etc/openstack-dashboard/local_settings.d',
:package_name => 'openstack-dashboard-apache',

View File

@ -520,10 +520,6 @@ describe 'horizon::wsgi::apache' do
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
if facts[:operatingsystem] == 'Debian'
facts.merge!( :os_package_type => 'debian' )
end
facts.merge!(OSDefaults.get_facts({
:fqdn => 'some.host.tld',
:concat_basedir => '/var/lib/puppet/concat',

View File

@ -45,10 +45,6 @@ describe 'horizon::dashboard' do
end
shared_examples 'horizon::dashboard on Debian' do
before do
facts.merge!({:os_package_type => 'debian'})
end
context 'with default' do
it { should contain_package('python3-heat-dashboard').with(
:ensure => 'installed',