
This adds defined anchor points for external modules to hook into the software install, config and service dependency chain. This allows external modules to manage software installation (virtualenv, containers, etc) and service management (pacemaker) without needing rely on resources that may change or be renamed. Change-Id: I0b524e354b095f2642fd38a2f88536d15bcdf855
34 lines
1015 B
Ruby
34 lines
1015 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'nova::cron::archive_deleted_rows' do
|
|
|
|
let :facts do
|
|
@default_facts.merge({ :osfamily => 'Debian' })
|
|
end
|
|
|
|
let :params do
|
|
{ :minute => 1,
|
|
:hour => 0,
|
|
:monthday => '*',
|
|
:month => '*',
|
|
:weekday => '*',
|
|
:max_rows => '100',
|
|
:user => 'nova',
|
|
:destination => '/var/log/nova/nova-rowsflush.log' }
|
|
end
|
|
|
|
it 'configures a cron' do
|
|
is_expected.to contain_cron('nova-manage db archive_deleted_rows').with(
|
|
:command => "nova-manage db archive_deleted_rows --max_rows #{params[:max_rows]} >>#{params[:destination]} 2>&1",
|
|
:environment => 'PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh',
|
|
:user => params[:user],
|
|
:minute => params[:minute],
|
|
:hour => params[:hour],
|
|
:monthday => params[:monthday],
|
|
:month => params[:month],
|
|
:weekday => params[:weekday],
|
|
:require => 'Anchor[nova::dbsync::end]',
|
|
)
|
|
end
|
|
end
|