X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fcinder%2Fspec%2Fclasses%2Fcinder_volume_iscsi_spec.rb;fp=3rdparty%2Fmodules%2Fcinder%2Fspec%2Fclasses%2Fcinder_volume_iscsi_spec.rb;h=0000000000000000000000000000000000000000;hb=6e1426dc77fb4e5d51f07c187c6f2219431dc31e;hp=5352badfc23caed8cd6ed70606833b8f783dc8a3;hpb=87423ba664cd5f2bb462ebadd08b1a90d0fe1c8d;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/cinder/spec/classes/cinder_volume_iscsi_spec.rb b/3rdparty/modules/cinder/spec/classes/cinder_volume_iscsi_spec.rb deleted file mode 100644 index 5352badfc..000000000 --- a/3rdparty/modules/cinder/spec/classes/cinder_volume_iscsi_spec.rb +++ /dev/null @@ -1,85 +0,0 @@ -require 'spec_helper' - -describe 'cinder::volume::iscsi' do - - let :req_params do - {:iscsi_ip_address => '127.0.0.2'} - end - - let :facts do - {:osfamily => 'Debian'} - end - - describe 'with default params' do - - let :params do - req_params - end - - it { should contain_cinder_config('DEFAULT/volume_driver').with( - :value => 'cinder.volume.drivers.lvm.LVMISCSIDriver')} - it { should contain_cinder_config('DEFAULT/iscsi_ip_address').with(:value => '127.0.0.2')} - it { should contain_cinder_config('DEFAULT/iscsi_helper').with(:value => 'tgtadm')} - it { should contain_cinder_config('DEFAULT/volume_group').with(:value => 'cinder-volumes')} - - end - - describe 'with iSER driver' do - let(:params) { req_params.merge( - :volume_driver => 'cinder.volume.drivers.lvm.LVMISERDriver')} - - it { should contain_cinder_config('DEFAULT/volume_driver').with( - :value => 'cinder.volume.drivers.lvm.LVMISERDriver')} - end - - describe 'with a unsupported iscsi helper' do - let(:params) { req_params.merge(:iscsi_helper => 'fooboozoo')} - - it 'should raise an error' do - expect { - should compile - }.to raise_error Puppet::Error, /Unsupported iscsi helper: fooboozoo/ - end - end - - describe 'with RedHat' do - - let :params do - req_params - end - - let :facts do - {:osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemmajrelease => '6'} - end - - it { should contain_file_line('cinder include').with( - :line => 'include /etc/cinder/volumes/*', - :path => '/etc/tgt/targets.conf' - ) } - - end - - describe 'with lioadm' do - - let :params do { - :iscsi_ip_address => '127.0.0.2', - :iscsi_helper => 'lioadm' - } - end - - let :facts do - {:osfamily => 'RedHat'} - end - - it { should contain_package('targetcli').with_ensure('present')} - it { should contain_service('target').with( - :ensure => 'running', - :enable => 'true', - :require => 'Package[targetcli]' - ) } - - end - -end