Debian Codegraph @

spec/classes/nova_cell_v2_map_cell0_spec.rb

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