puppet-mistral/spec/classes/mistral_client_spec.rb
Takashi Kajinami 8cbc3c6e78 Use new openstackclient tag
This looses dependency using the new openstackclient tag, which
requires only packages actually related to openstack CLI.

Also, mistralclient is not required by mistral itself so the service
package tag can be removed.

Depends-on: https://review.opendev.org/899594
Change-Id: I9752cc53f02fbe78afc286aadf91c6aa55d4116b
2023-11-20 00:43:08 +09:00

43 lines
1.0 KiB
Ruby

require 'spec_helper'
describe 'mistral::client' do
shared_examples_for 'mistral client' do
it { is_expected.to contain_class('mistral::deps') }
it { is_expected.to contain_class('mistral::params') }
it 'installs mistral client package' do
is_expected.to contain_package('python-mistralclient').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-mistralclient' }
when 'RedHat'
{ :client_package => 'python3-mistralclient' }
end
end
it_behaves_like 'mistral client'
end
end
end