Debian Codegraph @

spec/classes/nova_os_brick_spec.rb

raw
1 require 'spec_helper'
2
3 describe 'nova::os_brick' do
4
5 shared_examples 'nova::os_brick' do
6
7 context 'with defaults' do
8 it 'configures the default values' do
9 is_expected.to contain_oslo__os_brick('nova_config').with(
10 :lock_path => '<SERVICE DEFAULT>',
11 :wait_mpath_device_attempts => '<SERVICE DEFAULT>',
12 :wait_mpath_device_interval => '<SERVICE DEFAULT>',
13 )
14 end
15 end
16
17 context 'with parameters overridden' do
18 let :params do
19 {
20 :lock_path => '/var/lib/openstack/lock',
21 :wait_mpath_device_attempts => 4,
22 :wait_mpath_device_interval => 1,
23 }
24 end
25
26 it 'configures the overridden values' do
27 is_expected.to contain_oslo__os_brick('nova_config').with(
28 :lock_path => '/var/lib/openstack/lock',
29 :wait_mpath_device_attempts => 4,
30 :wait_mpath_device_interval => 1,
31 )
32 end
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 include_examples 'nova::os_brick'
45 end
46 end
47 end