| 1 | require 'spec_helper' |
| 2 | |
| 3 | describe 'magnum::clients::barbican' do |
| 4 | |
| 5 | shared_examples 'magnum::clients::barbican' do |
| 6 | |
| 7 | context 'with default parameters' do |
| 8 | let :params do |
| 9 | {} |
| 10 | end |
| 11 | |
| 12 | it { is_expected.to contain_magnum_config('barbican_client/region_name').with_value('RegionOne') } |
| 13 | it { is_expected.to contain_magnum_config('barbican_client/endpoint_type').with_value('<SERVICE DEFAULT>') } |
| 14 | end |
| 15 | |
| 16 | context 'with specific parameters' do |
| 17 | let :params do |
| 18 | { :region_name => 'RegionTwo', |
| 19 | :endpoint_type => 'adminURL', |
| 20 | } |
| 21 | end |
| 22 | |
| 23 | it { is_expected.to contain_magnum_config('barbican_client/region_name').with_value('RegionTwo') } |
| 24 | it { is_expected.to contain_magnum_config('barbican_client/endpoint_type').with_value('adminURL') } |
| 25 | end |
| 26 | end |
| 27 | |
| 28 | on_supported_os({ |
| 29 | :supported_os => OSDefaults.get_supported_os |
| 30 | }).each do |os,facts| |
| 31 | context "on #{os}" do |
| 32 | let (:facts) do |
| 33 | facts.merge!(OSDefaults.get_facts()) |
| 34 | end |
| 35 | |
| 36 | it_configures 'magnum::clients::barbican' |
| 37 | end |
| 38 | end |
| 39 | end |