]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/cinder/spec/classes/cinder_volume_nfs_spec.rb
449153fcdfbe23eb39da6da39be01651d23995b0
[dsa-puppet.git] / 3rdparty / modules / cinder / spec / classes / cinder_volume_nfs_spec.rb
1 require 'spec_helper'
2
3 describe 'cinder::volume::nfs' do
4
5   let :params do
6     {
7       :nfs_servers          => ['10.10.10.10:/shares', '10.10.10.10:/shares2'],
8       :nfs_mount_options    => 'vers=3',
9       :nfs_shares_config    => '/etc/cinder/other_shares.conf',
10       :nfs_disk_util        => 'du',
11       :nfs_sparsed_volumes  => true,
12       :nfs_mount_point_base => '/cinder_mount_point',
13       :nfs_used_ratio       => '0.95',
14       :nfs_oversub_ratio    => '1.0',
15     }
16   end
17
18   describe 'nfs volume driver' do
19     it 'configures nfs volume driver' do
20       should contain_cinder_config('DEFAULT/volume_driver').with_value(
21         'cinder.volume.drivers.nfs.NfsDriver')
22       should contain_cinder_config('DEFAULT/nfs_shares_config').with_value(
23         '/etc/cinder/other_shares.conf')
24       should contain_cinder_config('DEFAULT/nfs_mount_options').with_value(
25         'vers=3')
26       should contain_cinder_config('DEFAULT/nfs_sparsed_volumes').with_value(
27         true)
28       should contain_cinder_config('DEFAULT/nfs_mount_point_base').with_value(
29         '/cinder_mount_point')
30       should contain_cinder_config('DEFAULT/nfs_disk_util').with_value(
31         'du')
32       should contain_cinder_config('DEFAULT/nfs_used_ratio').with_value(
33         '0.95')
34       should contain_cinder_config('DEFAULT/nfs_oversub_ratio').with_value(
35         '1.0')
36       should contain_file('/etc/cinder/other_shares.conf').with(
37         :content => "10.10.10.10:/shares\n10.10.10.10:/shares2",
38         :require => 'Package[cinder]',
39         :notify  => 'Service[cinder-volume]'
40       )
41     end
42   end
43 end