Files
puppet-nova/spec/classes/nova_client_spec.rb
Thomas Goirand 8704768500 Debian is using Python 3
Change-Id: Ifff73db6697d5555c29a4a1bd724a2d9e6b7d67d
2018-04-10 20:51:25 +02:00

44 lines
1.0 KiB
Ruby

require 'spec_helper'
describe 'nova::client' do
shared_examples_for 'nova client' do
it { is_expected.to contain_class('nova::deps') }
it 'installs nova client package' do
is_expected.to contain_package('python-novaclient').with(
:ensure => 'present',
:name => platform_params[:client_package_name],
:tag => ['openstack', 'nova-support-package']
)
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'
if facts[:os_package_type] == 'debian'
{ :client_package_name => 'python3-novaclient' }
else
{ :client_package_name => 'python-novaclient' }
end
when 'RedHat'
{ :client_package_name => 'python-novaclient' }
end
end
it_behaves_like 'nova client'
end
end
end