Debian Codegraph @

spec/classes/cloudkitty_client_spec.rb

raw
1 require 'spec_helper'
2
3 describe 'cloudkitty::client' do
4
5 shared_examples_for 'cloudkitty client' do
6
7 it { is_expected.to contain_class('cloudkitty::deps') }
8 it { is_expected.to contain_class('cloudkitty::params') }
9
10 it 'installs cloudkitty client package' do
11 is_expected.to contain_package('python-cloudkittyclient').with(
12 :ensure => 'present',
13 :name => platform_params[:client_package_name],
14 :tag => ['openstack', 'openstackclient'],
15 )
16 end
17 end
18
19 on_supported_os({
20 :supported_os => OSDefaults.get_supported_os
21 }).each do |os,facts|
22 context "on #{os}" do
23 let (:facts) do
24 facts.merge!(OSDefaults.get_facts())
25 end
26
27 let(:platform_params) do
28 case facts[:os]['family']
29 when 'Debian'
30 { :client_package_name => 'python3-cloudkittyclient' }
31 when 'RedHat'
32 { :client_package_name => 'python3-cloudkittyclient' }
33 end
34 end
35
36 it_configures 'cloudkitty client'
37 end
38 end
39
40 end