101ca5b088
From Juno release, rbd related options has been move into glance_store section. See more info: http://docs.openstack.org/juno/config-reference/content/section_glance-api.conf.html Change-Id: Ibf38ee27f0ad08592dd05650c37613cee0100a7d Closes-Bug: #1436699
46 lines
1.4 KiB
Ruby
46 lines
1.4 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'glance::backend::rbd' do
|
|
let :facts do
|
|
{
|
|
:osfamily => 'Debian'
|
|
}
|
|
end
|
|
|
|
describe 'when defaults with rbd_store_user' do
|
|
let :params do
|
|
{
|
|
:rbd_store_user => 'glance',
|
|
}
|
|
end
|
|
|
|
it { is_expected.to contain_glance_api_config('glance_store/default_store').with_value('rbd') }
|
|
it { is_expected.to contain_glance_api_config('glance_store/rbd_store_pool').with_value('images') }
|
|
it { is_expected.to contain_glance_api_config('glance_store/rbd_store_ceph_conf').with_value('/etc/ceph/ceph.conf') }
|
|
it { is_expected.to contain_glance_api_config('glance_store/rbd_store_chunk_size').with_value('8') }
|
|
|
|
it { is_expected.to contain_package('python-ceph').with(
|
|
:name => 'python-ceph',
|
|
:ensure => 'present'
|
|
)
|
|
}
|
|
end
|
|
|
|
describe 'when passing params' do
|
|
let :params do
|
|
{
|
|
:rbd_store_user => 'user',
|
|
:rbd_store_chunk_size => '2',
|
|
:package_ensure => 'latest',
|
|
}
|
|
end
|
|
it { is_expected.to contain_glance_api_config('glance_store/rbd_store_user').with_value('user') }
|
|
it { is_expected.to contain_glance_api_config('glance_store/rbd_store_chunk_size').with_value('2') }
|
|
it { is_expected.to contain_package('python-ceph').with(
|
|
:name => 'python-ceph',
|
|
:ensure => 'latest'
|
|
)
|
|
}
|
|
end
|
|
end
|