Files
puppet-cloudkitty/spec/classes/cloudkitty_client_spec.rb
Thomas Goirand 5f643a27f0 Get rid of the $pyvers variable
Since everyone has switched to Python3, it's time for the removal of the
$pyvers variable.

Change-Id: I8c124fb850011a3fd13df504b1897305f944d062
2021-05-21 11:06:52 +02:00

41 lines
1002 B
Ruby

require 'spec_helper'
describe 'cloudkitty::client' do
shared_examples_for 'cloudkitty client' do
it { is_expected.to contain_class('cloudkitty::deps') }
it { is_expected.to contain_class('cloudkitty::params') }
it 'installs cloudkitty client package' do
is_expected.to contain_package('python-cloudkittyclient').with(
:ensure => 'present',
:name => platform_params[:client_package_name],
:tag => 'openstack',
)
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts())
end
let(:platform_params) do
case facts[:osfamily]
when 'Debian'
{ :client_package_name => 'python3-cloudkittyclient' }
when 'RedHat'
{ :client_package_name => 'python3-cloudkittyclient' }
end
end
it_configures 'cloudkitty client'
end
end
end