3 describe 'glance::cache::cleaner' do
5 shared_examples_for 'glance cache cleaner' do
7 context 'when default parameters' do
9 it 'configures a cron' do
10 should contain_cron('glance-cache-cleaner').with(
11 :command => 'glance-cache-cleaner ',
12 :environment => 'PATH=/bin:/usr/bin:/usr/sbin',
23 context 'when overriding parameters' do
31 :command_options => '--config-dir /etc/glance/',
34 it 'configures a cron' do
35 should contain_cron('glance-cache-cleaner').with(
36 :command => 'glance-cache-cleaner --config-dir /etc/glance/',
37 :environment => 'PATH=/bin:/usr/bin:/usr/sbin',
49 context 'on Debian platforms' do
51 { :osfamily => 'Debian' }
53 include_examples 'glance cache cleaner'
54 it { should contain_cron('glance-cache-cleaner').with(:require => 'Package[glance-api]')}
57 context 'on RedHat platforms' do
59 { :osfamily => 'RedHat' }
61 include_examples 'glance cache cleaner'
62 it { should contain_cron('glance-cache-cleaner').with(:require => 'Package[openstack-glance]')}