Merge "Enable DB purge cron job after database is initialized"

This commit is contained in:
Zuul 2021-12-30 22:27:55 +00:00 committed by Gerrit Code Review
commit 5c6dbfd634
2 changed files with 9 additions and 10 deletions

@ -79,8 +79,7 @@ class heat::cron::purge_deleted (
hour => $hour,
monthday => $monthday,
month => $month,
weekday => $weekday
weekday => $weekday,
require => Anchor['heat::dbsync::end']
}
Package<| tag == 'heat-package' |> -> Cron['heat-manage purge_deleted']
}

@ -35,9 +35,9 @@ describe 'heat::cron::purge_deleted' do
:hour => params[:hour],
:monthday => params[:monthday],
:month => params[:month],
:weekday => params[:weekday]
:weekday => params[:weekday],
:require => 'Anchor[heat::dbsync::end]'
)
is_expected.to contain_package('heat-common').that_comes_before('Cron[heat-manage purge_deleted]')
end
end
@ -58,9 +58,9 @@ describe 'heat::cron::purge_deleted' do
:hour => params[:hour],
:monthday => params[:monthday],
:month => params[:month],
:weekday => params[:weekday]
:weekday => params[:weekday],
:require => 'Anchor[heat::dbsync::end]'
)
is_expected.to contain_package('heat-common').that_comes_before('Cron[heat-manage purge_deleted]')
end
end
@ -71,7 +71,7 @@ describe 'heat::cron::purge_deleted' do
)
end
it 'configures a cron with delay' do
it 'disables the cron job' do
is_expected.to contain_cron('heat-manage purge_deleted').with(
:ensure => params[:ensure],
:command => "heat-manage purge_deleted -g days 1 >>#{params[:destination]} 2>&1",
@ -81,9 +81,9 @@ describe 'heat::cron::purge_deleted' do
:hour => params[:hour],
:monthday => params[:monthday],
:month => params[:month],
:weekday => params[:weekday]
:weekday => params[:weekday],
:require => 'Anchor[heat::dbsync::end]'
)
is_expected.to contain_package('heat-common').that_comes_before('Cron[heat-manage purge_deleted]')
end
end