3 describe 'cinder::backend::glusterfs' do
5 shared_examples_for 'glusterfs volume driver' do
6 let(:title) {'mygluster'}
10 :glusterfs_shares => ['10.10.10.10:/volumes', '10.10.10.11:/volumes'],
11 :glusterfs_shares_config => '/etc/cinder/other_shares.conf',
12 :glusterfs_sparsed_volumes => true,
13 :glusterfs_mount_point_base => '/cinder_mount_point',
17 it 'configures glusterfs volume driver' do
18 should contain_cinder_config('mygluster/volume_driver').with_value(
19 'cinder.volume.drivers.glusterfs.GlusterfsDriver')
20 should contain_cinder_config('mygluster/glusterfs_shares_config').with_value(
21 '/etc/cinder/other_shares.conf')
22 should contain_cinder_config('mygluster/glusterfs_sparsed_volumes').with_value(
24 should contain_cinder_config('mygluster/glusterfs_mount_point_base').with_value(
25 '/cinder_mount_point')
26 should contain_file('/etc/cinder/other_shares.conf').with(
27 :content => "10.10.10.10:/volumes\n10.10.10.11:/volumes\n",
28 :require => 'Package[cinder]',
29 :notify => 'Service[cinder-volume]'
33 context "with an parameter which has been removed" do
36 :glusterfs_disk_util => 'foo',
40 expect { subject }.to raise_error(Puppet::Error, /glusterfs_disk_util is removed in Icehouse./)
45 context 'on Debian platforms' do
47 { :osfamily => 'Debian' }
50 it_configures 'glusterfs volume driver'
53 context 'on RedHat platforms' do
55 { :osfamily => 'RedHat' }
58 it_configures 'glusterfs volume driver'