3 describe 'cinder::volume::glusterfs' do
5 shared_examples_for 'glusterfs volume driver' do
8 :glusterfs_shares => ['10.10.10.10:/volumes', '10.10.10.11:/volumes'],
9 :glusterfs_shares_config => '/etc/cinder/other_shares.conf',
10 :glusterfs_sparsed_volumes => true,
11 :glusterfs_mount_point_base => '/cinder_mount_point',
15 it 'configures glusterfs volume driver' do
16 should contain_cinder_config('DEFAULT/volume_driver').with_value(
17 'cinder.volume.drivers.glusterfs.GlusterfsDriver')
18 should contain_cinder_config('DEFAULT/glusterfs_shares_config').with_value(
19 '/etc/cinder/other_shares.conf')
20 should contain_cinder_config('DEFAULT/glusterfs_sparsed_volumes').with_value(
22 should contain_cinder_config('DEFAULT/glusterfs_mount_point_base').with_value(
23 '/cinder_mount_point')
24 should contain_file('/etc/cinder/other_shares.conf').with(
25 :content => "10.10.10.10:/volumes\n10.10.10.11:/volumes\n",
26 :require => 'Package[cinder]',
27 :notify => 'Service[cinder-volume]'
31 context "with an parameter which has been removed" do
34 :glusterfs_disk_util => 'foo',
38 expect { subject }.to raise_error(Puppet::Error, /glusterfs_disk_util is removed in Icehouse./)
43 context 'on Debian platforms' do
45 { :osfamily => 'Debian' }
48 it_configures 'glusterfs volume driver'
51 context 'on RedHat platforms' do
53 { :osfamily => 'RedHat' }
56 it_configures 'glusterfs volume driver'