Debian is using python3-troveclient
Change-Id: Ie5c525b42ff29f212d9e0b2de43c9a8dc93b2232
This commit is contained in:
parent
2a99e642d8
commit
1dfb0d428b
@ -5,7 +5,13 @@
|
||||
class trove::params {
|
||||
include ::openstacklib::defaults
|
||||
|
||||
$client_package_name = 'python-troveclient'
|
||||
if ($::os_package_type == 'debian') {
|
||||
$pyvers = '3'
|
||||
} else {
|
||||
$pyvers = ''
|
||||
}
|
||||
|
||||
$client_package_name = "python${pyvers}-troveclient"
|
||||
$group = 'trove'
|
||||
|
||||
case $::osfamily {
|
||||
|
@ -25,14 +25,20 @@ describe 'trove::client' do
|
||||
shared_examples_for 'trove client' do
|
||||
|
||||
context 'with default parameters' do
|
||||
it { is_expected.to contain_package('python-troveclient').with_ensure('present') }
|
||||
it { is_expected.to contain_package('python-troveclient').with(
|
||||
'ensure' => 'present',
|
||||
'name' => platform_params[:client_package_name],
|
||||
)}
|
||||
end
|
||||
|
||||
context 'with package_ensure parameter provided' do
|
||||
let :params do
|
||||
{ :package_ensure => false }
|
||||
end
|
||||
it { is_expected.to contain_package('python-troveclient').with_ensure('false') }
|
||||
it { is_expected.to contain_package('python-troveclient').with(
|
||||
'ensure' => false,
|
||||
'name' => platform_params[:client_package_name],
|
||||
)}
|
||||
end
|
||||
|
||||
end
|
||||
@ -45,6 +51,19 @@ describe 'trove::client' 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-troveclient' }
|
||||
else
|
||||
{ :client_package_name => 'python-troveclient' }
|
||||
end
|
||||
when 'RedHat'
|
||||
{ :client_package_name => 'python-troveclient' }
|
||||
end
|
||||
end
|
||||
|
||||
it_configures 'trove client'
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user