puppet-manila/spec/classes/manila_client_spec.rb
Takashi Kajinami b16813c39c client: Install openstackclient
The manila CLI was already deprecated in favor of the openstack CLI
plugin[1]. Install openstackclient when client is requested so that
the openstack CLI can be used.

[1] ba9a3887869ecd4cbed4aeb43c11a3d9493fafa2

Change-Id: I4589f6d74b3f4b6b88333306eb013b91fc0a9d44
2024-04-20 17:56:56 +09:00

43 lines
1.0 KiB
Ruby

require 'spec_helper'
describe 'manila::client' do
shared_examples_for 'manila client' do
it { is_expected.to contain_class('manila::deps') }
it { is_expected.to contain_class('manila::params') }
it 'installs manila client package' do
is_expected.to contain_package('python-manilaclient').with(
:ensure => 'present',
:name => platform_params[:client_package],
:tag => ['openstack', 'openstackclient'],
)
end
it { is_expected.to contain_class('openstacklib::openstackclient') }
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[:os]['family']
when 'Debian'
{ :client_package => 'python3-manilaclient' }
when 'RedHat'
{ :client_package => 'python3-manilaclient' }
end
end
it_behaves_like 'manila client'
end
end
end