| 1 |
require 'spec_helper' |
| 2 |
|
| 3 |
describe 'nova::compute::libvirt::config' do |
| 4 |
shared_examples 'nova::compute::libvirt::config' do |
| 5 |
let :params do |
| 6 |
{ |
| 7 |
:libvirtd_config => { |
| 8 |
'foo' => { 'value' => 'fooValue' }, |
| 9 |
'bar' => { 'value' => 'barValue' }, |
| 10 |
'baz' => { 'ensure' => 'absent' } |
| 11 |
}, |
| 12 |
:virtlogd_config => { |
| 13 |
'foo2' => { 'value' => 'fooValue' }, |
| 14 |
'bar2' => { 'value' => 'barValue' }, |
| 15 |
'baz2' => { 'ensure' => 'absent' } |
| 16 |
}, |
| 17 |
:virtlockd_config => { |
| 18 |
'foo3' => { 'value' => 'fooValue' }, |
| 19 |
'bar3' => { 'value' => 'barValue' }, |
| 20 |
'baz3' => { 'ensure' => 'absent' } |
| 21 |
} |
| 22 |
} |
| 23 |
end |
| 24 |
|
| 25 |
context 'with specified configs' do |
| 26 |
it { should contain_class('nova::deps') } |
| 27 |
|
| 28 |
it { |
| 29 |
should contain_libvirtd_config('foo').with_value('fooValue') |
| 30 |
should contain_libvirtd_config('bar').with_value('barValue') |
| 31 |
should contain_libvirtd_config('baz').with_ensure('absent') |
| 32 |
} |
| 33 |
|
| 34 |
it { |
| 35 |
should contain_virtlogd_config('foo2').with_value('fooValue') |
| 36 |
should contain_virtlogd_config('bar2').with_value('barValue') |
| 37 |
should contain_virtlogd_config('baz2').with_ensure('absent') |
| 38 |
} |
| 39 |
|
| 40 |
it { |
| 41 |
should contain_virtlockd_config('foo3').with_value('fooValue') |
| 42 |
should contain_virtlockd_config('bar3').with_value('barValue') |
| 43 |
should contain_virtlockd_config('baz3').with_ensure('absent') |
| 44 |
} |
| 45 |
end |
| 46 |
end |
| 47 |
|
| 48 |
on_supported_os({ |
| 49 |
:supported_os => OSDefaults.get_supported_os |
| 50 |
}).each do |os,facts| |
| 51 |
context "on #{os}" do |
| 52 |
let (:facts) do |
| 53 |
facts.merge!(OSDefaults.get_facts()) |
| 54 |
end |
| 55 |
|
| 56 |
it_behaves_like 'nova::compute::libvirt::config' |
| 57 |
end |
| 58 |
end |
| 59 |
end |