X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=3rdparty%2Fmodules%2Fcinder%2Fspec%2Fdefines%2Fcinder_backend_nfs_spec.rb;fp=3rdparty%2Fmodules%2Fcinder%2Fspec%2Fdefines%2Fcinder_backend_nfs_spec.rb;h=bc7906f6dbfdf1fa10ead4b9c3d17ca3f4333891;hb=4631045ebb77ee8622f6fa09277a50c372bcc02e;hp=0000000000000000000000000000000000000000;hpb=3d4dc4fd9e59bd0e07646c99f6b356c7d9d859aa;p=dsa-puppet.git diff --git a/3rdparty/modules/cinder/spec/defines/cinder_backend_nfs_spec.rb b/3rdparty/modules/cinder/spec/defines/cinder_backend_nfs_spec.rb new file mode 100644 index 00000000..bc7906f6 --- /dev/null +++ b/3rdparty/modules/cinder/spec/defines/cinder_backend_nfs_spec.rb @@ -0,0 +1,48 @@ +require 'spec_helper' + +describe 'cinder::backend::nfs' do + + let(:title) {'hippo'} + + let :params do + { + :nfs_servers => ['10.10.10.10:/shares', '10.10.10.10:/shares2'], + :nfs_mount_options => 'vers=3', + :nfs_shares_config => '/etc/cinder/other_shares.conf', + :nfs_disk_util => 'du', + :nfs_sparsed_volumes => true, + :nfs_mount_point_base => '/cinder_mount_point', + :nfs_used_ratio => '0.7', + :nfs_oversub_ratio => '0.9' + } + end + + describe 'nfs volume driver' do + + it 'configures nfs volume driver' do + should contain_cinder_config('hippo/volume_backend_name').with( + :value => 'hippo') + should contain_cinder_config('hippo/volume_driver').with_value( + 'cinder.volume.drivers.nfs.NfsDriver') + should contain_cinder_config('hippo/nfs_shares_config').with_value( + '/etc/cinder/other_shares.conf') + should contain_cinder_config('hippo/nfs_mount_options').with_value( + 'vers=3') + should contain_cinder_config('hippo/nfs_sparsed_volumes').with_value( + true) + should contain_cinder_config('hippo/nfs_mount_point_base').with_value( + '/cinder_mount_point') + should contain_cinder_config('hippo/nfs_disk_util').with_value( + 'du') + should contain_cinder_config('hippo/nfs_used_ratio').with_value( + '0.7') + should contain_cinder_config('hippo/nfs_oversub_ratio').with_value( + '0.9') + should contain_file('/etc/cinder/other_shares.conf').with( + :content => "10.10.10.10:/shares\n10.10.10.10:/shares2", + :require => 'Package[cinder]', + :notify => 'Service[cinder-volume]' + ) + end + end +end