Files
puppet-nova/spec/classes/nova_client_spec.rb
Lee Yarwood e039c84350 Inherit pyvers from openstacklib::defaults
Depends-On: I84b767921d151a61429b2c89e6372c4b447f0d7d
Depends-On: I6769ae262cbe112c63c14b43acbbcdff13ea5e16
Depends-On: https://review.openstack.org/#/c/633162/
Change-Id: I1a9565fa37bc8493541450c430216c8ae32c9b77
2019-01-29 15:08:41 +01:00

40 lines
916 B
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'
{ :client_package_name => 'python3-novaclient' }
when 'RedHat'
{ :client_package_name => 'python-novaclient' }
end
end
it_behaves_like 'nova client'
end
end
end