try again, with puppetforge modules, correctly included now
[mirror/dsa-puppet.git] / 3rdparty / modules / cinder / spec / classes / cinder_volume_nexenta_spec.rb
1 # author 'Aimon Bustardo <abustardo at morphlabs dot com>'
2 # license 'Apache License 2.0'
3 # description 'configures openstack cinder nexenta driver'
4 require 'spec_helper'
5
6 describe 'cinder::volume::nexenta' do
7
8   let :params do
9     { :nexenta_user     => 'nexenta',
10       :nexenta_password => 'password',
11       :nexenta_host     => '127.0.0.2' }
12   end
13
14   let :default_params do
15     { :nexenta_volume              => 'cinder',
16       :nexenta_target_prefix       => 'iqn:',
17       :nexenta_target_group_prefix => 'cinder/',
18       :nexenta_blocksize           => '8k',
19       :nexenta_sparse              => true }
20   end
21
22   let :facts do
23     { :osfamily => 'Debian' }
24   end
25
26
27   context 'with required params' do
28     let :params_hash do
29       default_params.merge(params)
30     end
31
32     it 'configures nexenta volume driver' do
33       params_hash.each_pair do |config, value|
34         should contain_cinder_config("DEFAULT/#{config}").with_value(value)
35       end
36     end
37
38     it 'marks nexenta_password as secret' do
39       should contain_cinder_config('DEFAULT/nexenta_password').with_secret( true )
40     end
41
42   end
43 end