| 1 |
require 'spec_helper' |
| 2 |
|
| 3 |
describe 'nova::reports' do |
| 4 |
shared_examples 'nova::reports' do |
| 5 |
context 'with default parameters' do |
| 6 |
it { |
| 7 |
is_expected.to contain_oslo__reports('nova_config').with( |
| 8 |
:log_dir => '<SERVICE DEFAULT>', |
| 9 |
:file_event_handler => '<SERVICE DEFAULT>', |
| 10 |
:file_event_handler_interval => '<SERVICE DEFAULT>', |
| 11 |
) |
| 12 |
} |
| 13 |
end |
| 14 |
|
| 15 |
context 'with specified parameters' do |
| 16 |
let :params do |
| 17 |
{ |
| 18 |
:log_dir => '/var/log/nova', |
| 19 |
:file_event_handler => '/var/tmp/nova/reports', |
| 20 |
:file_event_handler_interval => 1, |
| 21 |
} |
| 22 |
end |
| 23 |
|
| 24 |
it { |
| 25 |
is_expected.to contain_oslo__reports('nova_config').with( |
| 26 |
:log_dir => '/var/log/nova', |
| 27 |
:file_event_handler => '/var/tmp/nova/reports', |
| 28 |
:file_event_handler_interval => 1, |
| 29 |
) |
| 30 |
} |
| 31 |
end |
| 32 |
end |
| 33 |
|
| 34 |
on_supported_os({ |
| 35 |
:supported_os => OSDefaults.get_supported_os |
| 36 |
}).each do |os,facts| |
| 37 |
context "on #{os}" do |
| 38 |
let (:facts) do |
| 39 |
facts.merge(OSDefaults.get_facts()) |
| 40 |
end |
| 41 |
|
| 42 |
it_behaves_like 'nova::reports' |
| 43 |
end |
| 44 |
end |
| 45 |
end |