Debian Codegraph @

spec/classes/nova_cell_v2_map_cell_and_hosts_spec.rb

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