Debian Codegraph @

spec/classes/nova_cell_v2_discover_hosts_spec.rb

raw
1 require 'spec_helper'
2
3 describe 'nova::cell_v2::discover_hosts' do
4
5 shared_examples_for 'nova::cell_v2::discover_hosts' do
6 context 'with defaults' do
7
8 it {
9 is_expected.to contain_exec('nova-cell_v2-discover_hosts').with(
10 :path => ['/bin', '/usr/bin'],
11 :command => 'nova-manage cell_v2 discover_hosts',
12 :user => 'nova',
13 :refreshonly => true,
14 :subscribe => 'Anchor[nova::service::end]'
15 )
16 }
17 end
18
19 context "overriding extra_params" do
20 let :params do
21 {
22 :extra_params => '--config-file /etc/nova/nova.conf'
23 }
24 end
25
26 it {
27 is_expected.to contain_exec('nova-cell_v2-discover_hosts').with(
28 :path => ['/bin', '/usr/bin'],
29 :command => 'nova-manage --config-file /etc/nova/nova.conf cell_v2 discover_hosts',
30 :user => 'nova',
31 :refreshonly => true,
32 :subscribe => 'Anchor[nova::service::end]'
33 )
34 }
35 end
36 end
37
38
39 on_supported_os({
40 :supported_os => OSDefaults.get_supported_os
41 }).each do |os,facts|
42 context "on #{os}" do
43 let (:facts) do
44 facts.merge(OSDefaults.get_facts())
45 end
46
47 it_configures 'nova::cell_v2::discover_hosts'
48 end
49 end
50
51 end