]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/cinder/spec/defines/cinder_backend_iscsi_spec.rb
try again, with puppetforge modules, correctly included now
[dsa-puppet.git] / 3rdparty / modules / cinder / spec / defines / cinder_backend_iscsi_spec.rb
1 require 'spec_helper'
2
3 describe 'cinder::backend::iscsi' do
4
5   let(:title) {'hippo'}
6
7   let :req_params do {
8     :iscsi_ip_address => '127.0.0.2',
9     :iscsi_helper => 'tgtadm',
10   }
11   end
12
13   let :facts do
14     {:osfamily => 'Debian'}
15   end
16
17   let :params do
18     req_params
19   end
20
21   describe 'with default params' do
22
23     it 'should configure iscsi driver' do
24       should contain_cinder_config('hippo/volume_backend_name').with(
25         :value => 'hippo')
26       should contain_cinder_config('hippo/volume_driver').with(
27         :value => 'cinder.volume.drivers.lvm.LVMISCSIDriver')
28       should contain_cinder_config('hippo/iscsi_ip_address').with(
29         :value => '127.0.0.2')
30       should contain_cinder_config('hippo/iscsi_helper').with(
31         :value => 'tgtadm')
32       should contain_cinder_config('hippo/volume_group').with(
33         :value => 'cinder-volumes')
34     end
35   end
36
37   describe 'with RedHat' do
38
39     let :facts do
40       {:osfamily => 'RedHat'}
41     end
42
43     it { should contain_file_line('cinder include').with(
44       :line => 'include /etc/cinder/volumes/*',
45       :path => '/etc/tgt/targets.conf'
46     ) }
47
48   end
49
50 end