Change the way Murano dashboard collects static with UCA packages
Horizon UCA packages collects static during installation and doesn't recollect it if we use '--clear' option. It leads to static absesnce. So we need to delete '--clear' option for Murano dashboard collectstatic script when we use UCA packages Change-Id: I9719208dff88ce4f3be1b038b8bb6a49a6ec387f Related-Bug: #1603528
This commit is contained in:
parent
ff0d1b76c3
commit
5e6d5d3233
@ -91,8 +91,14 @@ class murano::dashboard(
|
||||
path => [ '/bin/', '/sbin/', '/usr/bin/', '/usr/sbin/' ],
|
||||
}
|
||||
|
||||
if $::os_package_type == 'ubuntu' {
|
||||
$collect_static_command = "${collect_static_script} collectstatic --noinput"
|
||||
} else {
|
||||
$collect_static_command = "${collect_static_script} collectstatic --noinput --clear"
|
||||
}
|
||||
|
||||
exec { 'django_collectstatic':
|
||||
command => "${collect_static_script} collectstatic --noinput --clear",
|
||||
command => $collect_static_command,
|
||||
environment => [
|
||||
"APACHE_USER=${::apache::params::user}",
|
||||
"APACHE_GROUP=${::apache::params::group}",
|
||||
|
@ -7,6 +7,14 @@ describe 'murano::dashboard' do
|
||||
end
|
||||
|
||||
shared_examples_for 'with default class parameters' do
|
||||
let(:collect_static_command) {
|
||||
if facts[:os_package_type] == 'ubuntu'
|
||||
"/usr/share/openstack-dashboard/manage.py collectstatic --noinput"
|
||||
else
|
||||
"/usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear"
|
||||
end
|
||||
}
|
||||
|
||||
it { is_expected.to contain_package('murano-dashboard').with({
|
||||
:ensure => 'present',
|
||||
:name => 'python-murano-dashboard',
|
||||
@ -39,7 +47,7 @@ describe 'murano::dashboard' do
|
||||
})}
|
||||
|
||||
it { is_expected.to contain_exec('django_collectstatic').with({
|
||||
:command => '/usr/share/openstack-dashboard/manage.py collectstatic --noinput --clear'
|
||||
:command => collect_static_command
|
||||
})}
|
||||
|
||||
it { is_expected.to contain_exec('django_compressstatic').with({
|
||||
@ -64,6 +72,14 @@ describe 'murano::dashboard' do
|
||||
}
|
||||
end
|
||||
|
||||
let(:collect_static_command) {
|
||||
if facts[:os_package_type] == 'ubuntu'
|
||||
"/bin/openstack-dashboard/manage.py collectstatic --noinput"
|
||||
else
|
||||
"/bin/openstack-dashboard/manage.py collectstatic --noinput --clear"
|
||||
end
|
||||
}
|
||||
|
||||
it { is_expected.to contain_package('murano-dashboard').with({
|
||||
:ensure => 'present',
|
||||
:name => 'python-murano-dashboard',
|
||||
@ -95,7 +111,7 @@ describe 'murano::dashboard' do
|
||||
})}
|
||||
|
||||
it { is_expected.to contain_exec('django_collectstatic').with({
|
||||
:command => '/bin/openstack-dashboard/manage.py collectstatic --noinput --clear'
|
||||
:command => collect_static_command
|
||||
})}
|
||||
|
||||
it { is_expected.to contain_exec('django_compressstatic').with({
|
||||
|
Loading…
Reference in New Issue
Block a user