Merge "Remove usage of custom os_package_type fact"
This commit is contained in:
commit
e888297867
|
@ -760,7 +760,7 @@ and usage of a quoted value is deprecated.')
|
||||||
|
|
||||||
if $compress_offline {
|
if $compress_offline {
|
||||||
Concat<| tag == 'django-config' |> ~> Exec['refresh_horizon_django_compress']
|
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']
|
Concat<| tag == 'django-config' |> ~> Exec['refresh_horizon_django_cache'] -> Exec['refresh_horizon_django_compress']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,8 +38,8 @@ class horizon::params {
|
||||||
$heat_dashboard_package_name = 'python3-heat-dashboard'
|
$heat_dashboard_package_name = 'python3-heat-dashboard'
|
||||||
$manila_dashboard_package_name = 'python3-manila-dashboard'
|
$manila_dashboard_package_name = 'python3-manila-dashboard'
|
||||||
$octavia_dashboard_package_name = 'python3-octavia-dashboard'
|
$octavia_dashboard_package_name = 'python3-octavia-dashboard'
|
||||||
case $::os_package_type {
|
case $::operatingsystem {
|
||||||
'debian': {
|
'Debian': {
|
||||||
$package_name = 'openstack-dashboard-apache'
|
$package_name = 'openstack-dashboard-apache'
|
||||||
$httpd_config_file = '/etc/apache2/sites-available/openstack-dashboard-alias-only.conf'
|
$httpd_config_file = '/etc/apache2/sites-available/openstack-dashboard-alias-only.conf'
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ describe 'horizon' do
|
||||||
:refreshonly => true,
|
:refreshonly => true,
|
||||||
})}
|
})}
|
||||||
it {
|
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_cache]')
|
||||||
is_expected.to contain_concat(platforms_params[:config_file]).that_notifies('Exec[refresh_horizon_django_compress]')
|
is_expected.to contain_concat(platforms_params[:config_file]).that_notifies('Exec[refresh_horizon_django_compress]')
|
||||||
else
|
else
|
||||||
|
@ -767,7 +767,7 @@ describe 'horizon' do
|
||||||
let(:platforms_params) do
|
let(:platforms_params) do
|
||||||
case facts[:osfamily]
|
case facts[:osfamily]
|
||||||
when 'Debian'
|
when 'Debian'
|
||||||
if facts[:os_package_type] == 'debian'
|
if facts[:operatingsystem] == 'Debian'
|
||||||
{ :config_file => '/etc/openstack-dashboard/local_settings.py',
|
{ :config_file => '/etc/openstack-dashboard/local_settings.py',
|
||||||
:conf_d_dir => '/etc/openstack-dashboard/local_settings.d',
|
:conf_d_dir => '/etc/openstack-dashboard/local_settings.d',
|
||||||
:package_name => 'openstack-dashboard-apache',
|
:package_name => 'openstack-dashboard-apache',
|
||||||
|
|
|
@ -520,10 +520,6 @@ describe 'horizon::wsgi::apache' do
|
||||||
}).each do |os,facts|
|
}).each do |os,facts|
|
||||||
context "on #{os}" do
|
context "on #{os}" do
|
||||||
let (:facts) do
|
let (:facts) do
|
||||||
if facts[:operatingsystem] == 'Debian'
|
|
||||||
facts.merge!( :os_package_type => 'debian' )
|
|
||||||
end
|
|
||||||
|
|
||||||
facts.merge!(OSDefaults.get_facts({
|
facts.merge!(OSDefaults.get_facts({
|
||||||
:fqdn => 'some.host.tld',
|
:fqdn => 'some.host.tld',
|
||||||
:concat_basedir => '/var/lib/puppet/concat',
|
:concat_basedir => '/var/lib/puppet/concat',
|
||||||
|
|
|
@ -45,10 +45,6 @@ describe 'horizon::dashboard' do
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples 'horizon::dashboard on Debian' do
|
shared_examples 'horizon::dashboard on Debian' do
|
||||||
before do
|
|
||||||
facts.merge!({:os_package_type => 'debian'})
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with default' do
|
context 'with default' do
|
||||||
it { should contain_package('python3-heat-dashboard').with(
|
it { should contain_package('python3-heat-dashboard').with(
|
||||||
:ensure => 'installed',
|
:ensure => 'installed',
|
||||||
|
|
Loading…
Reference in New Issue