9bfe92a39ec5e8ed2aa45121dcd81e8c6b1871fa
[mirror/dsa-puppet.git] / 3rdparty / modules / nova / spec / classes / nova_config_spec.rb
1 require 'spec_helper'
2
3 describe 'nova::config' do
4
5   let :params do
6     { :nova_config => {
7         'DEFAULT/foo' => { 'value'  => 'fooValue' },
8         'DEFAULT/bar' => { 'value'  => 'barValue' },
9         'DEFAULT/baz' => { 'ensure' => 'absent' }
10       },
11       :nova_paste_api_ini => {
12         'DEFAULT/foo2' => { 'value'  => 'fooValue' },
13         'DEFAULT/bar2' => { 'value'  => 'barValue' },
14         'DEFAULT/baz2' => { 'ensure' => 'absent' }
15       }
16     }
17   end
18
19   it 'configures arbitrary nova configurations' do
20     should contain_nova_config('DEFAULT/foo').with_value('fooValue')
21     should contain_nova_config('DEFAULT/bar').with_value('barValue')
22     should contain_nova_config('DEFAULT/baz').with_ensure('absent')
23   end
24
25   it 'configures arbitrary nova api-paste configurations' do
26     should contain_nova_paste_api_ini('DEFAULT/foo2').with_value('fooValue')
27     should contain_nova_paste_api_ini('DEFAULT/bar2').with_value('barValue')
28     should contain_nova_paste_api_ini('DEFAULT/baz2').with_ensure('absent')
29   end
30 end