
I had previously checked in some broken tests that resulted from the updating the concat fragments names to ensure uniqueness between services (eg, choosing fragment names like HEADER were causing duplicate resource errors, these have been prefixed with the service name glance-api to ensure uniqueness) This commit updates the tests so that they work for this previous commit (oops!)
39 lines
1.0 KiB
Ruby
39 lines
1.0 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'glance::backend::file' do
|
|
let :facts do
|
|
{
|
|
:osfamily => 'Debian'
|
|
}
|
|
end
|
|
it 'should set the default store to file' do
|
|
verify_contents(
|
|
subject,
|
|
'/var/lib/puppet/concat/_etc_glance_glance-api.conf/fragments/04_glance-api-backend',
|
|
['default_store = file']
|
|
)
|
|
end
|
|
it 'should configure file backend settings' do
|
|
verify_contents(
|
|
subject,
|
|
'/var/lib/puppet/concat/_etc_glance_glance-api.conf/fragments/05_glance-api-file',
|
|
['filesystem_store_datadir = /var/lib/glance/images/']
|
|
)
|
|
end
|
|
describe 'when datadir is overridden' do
|
|
let :params do
|
|
{
|
|
:filesystem_store_datadir => '/var/lib/glance/images2'
|
|
}
|
|
end
|
|
|
|
it 'should configure file backend settings with specified parameter' do
|
|
verify_contents(
|
|
subject,
|
|
'/var/lib/puppet/concat/_etc_glance_glance-api.conf/fragments/05_glance-api-file',
|
|
['filesystem_store_datadir = /var/lib/glance/images2']
|
|
)
|
|
end
|
|
end
|
|
end
|