Debian Codegraph @

spec/classes/nova_key_manager_barbican_spec.rb

raw
1 require 'spec_helper'
2
3 describe 'nova::key_manager::barbican' do
4 shared_examples 'nova::key_manager::barbican' do
5 context 'with default parameters' do
6 it {
7 is_expected.to contain_oslo__key_manager__barbican('nova_config').with(
8 :barbican_endpoint => '<SERVICE DEFAULT>',
9 :barbican_api_version => '<SERVICE DEFAULT>',
10 :auth_endpoint => '<SERVICE DEFAULT>',
11 :retry_delay => '<SERVICE DEFAULT>',
12 :number_of_retries => '<SERVICE DEFAULT>',
13 :barbican_endpoint_type => '<SERVICE DEFAULT>',
14 :barbican_region_name => '<SERVICE DEFAULT>',
15 :send_service_user_token => '<SERVICE DEFAULT>',
16 :insecure => '<SERVICE DEFAULT>',
17 :cafile => '<SERVICE DEFAULT>',
18 :certfile => '<SERVICE DEFAULT>',
19 :keyfile => '<SERVICE DEFAULT>',
20 :timeout => '<SERVICE DEFAULT>',
21 )
22
23 is_expected.to contain_package('cryptsetup').with(
24 :ensure => 'installed',
25 :tag => 'openstack',
26 )
27 }
28 end
29
30 context 'with specified parameters' do
31 let :params do
32 {
33 :barbican_endpoint => 'http://localhost:9311/',
34 :barbican_api_version => 'v1',
35 :auth_endpoint => 'http://localhost:5000',
36 :retry_delay => 1,
37 :number_of_retries => 60,
38 :barbican_endpoint_type => 'public',
39 :barbican_region_name => 'regionOne',
40 :send_service_user_token => true,
41 :insecure => false,
42 :cafile => 'cafile.pem',
43 :certfile => 'certfile.crt',
44 :keyfile => 'somekey.key',
45 :timeout => 60,
46 }
47 end
48
49 it {
50 is_expected.to contain_oslo__key_manager__barbican('nova_config').with(
51 :barbican_endpoint => 'http://localhost:9311/',
52 :barbican_api_version => 'v1',
53 :auth_endpoint => 'http://localhost:5000',
54 :retry_delay => 1,
55 :number_of_retries => 60,
56 :barbican_endpoint_type => 'public',
57 :barbican_region_name => 'regionOne',
58 :send_service_user_token => true,
59 :insecure => false,
60 :cafile => 'cafile.pem',
61 :certfile => 'certfile.crt',
62 :keyfile => 'somekey.key',
63 :timeout => 60,
64 )
65
66 is_expected.to contain_package('cryptsetup').with(
67 :ensure => 'installed',
68 :tag => 'openstack',
69 )
70 }
71 end
72 end
73
74 on_supported_os({
75 :supported_os => OSDefaults.get_supported_os
76 }).each do |os,facts|
77 context "on #{os}" do
78 let (:facts) do
79 facts.merge(OSDefaults.get_facts())
80 end
81
82 it_behaves_like 'nova::key_manager::barbican'
83 end
84 end
85 end