
This code moves all deps to an external class so that Cinder can be installed with mechanisms besides packages (like venv or docker). This also cleans-up the dependency tree by removing false or confusing dependencies. Co-Author: Craig Delatte <craig.delatte@twcable.com> Change-Id: I55a62f6173fe463fb8fb65df6729c9f509a0fb04
34 lines
948 B
Ruby
34 lines
948 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'cinder::cron::db_purge' do
|
|
|
|
let :facts do
|
|
{ :osfamily => 'RedHat' }
|
|
end
|
|
|
|
let :params do
|
|
{ :minute => 1,
|
|
:hour => 0,
|
|
:monthday => '*',
|
|
:month => '*',
|
|
:weekday => '*',
|
|
:user => 'cinder',
|
|
:age => '30',
|
|
:destination => '/var/log/cinder/cinder-rowsflush.log' }
|
|
end
|
|
|
|
it 'configures a cron' do
|
|
is_expected.to contain_cron('cinder-manage db purge').with(
|
|
:command => "cinder-manage db purge #{params[:age]} >>#{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[cinder::install::end]'
|
|
)
|
|
end
|
|
end
|