Debian Codegraph @

spec/classes/nova_cell_v2_map_instances_spec.rb

raw
1 require 'spec_helper'
2
3 describe 'nova::cell_v2::map_instances' do
4
5 shared_examples_for 'nova::cell_v2::map_instances' do
6 context 'with defaults' do
7 let (:params) { { :cell_uuid => 'uuid' } }
8
9 it {
10 is_expected.to contain_exec('nova-cell_v2-map_instances').with(
11 :path => ['/bin', '/usr/bin'],
12 :command => 'nova-manage cell_v2 map_instances --cell_uuid=uuid',
13 :user => 'nova',
14 :refreshonly => true,
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 :cell_uuid => 'uuid'
24 }
25 end
26
27 it {
28 is_expected.to contain_exec('nova-cell_v2-map_instances').with(
29 :path => ['/bin', '/usr/bin'],
30 :command => 'nova-manage --config-file /etc/nova/nova.conf cell_v2 map_instances --cell_uuid=uuid',
31 :user => 'nova',
32 :refreshonly => true,
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::map_instances'
48 end
49 end
50
51 end