Merge "Debian is using Python 3"

This commit is contained in:
Zuul 2018-04-10 16:13:24 +00:00 committed by Gerrit Code Review
commit 6021652b09
2 changed files with 20 additions and 2 deletions

View File

@ -5,7 +5,12 @@
class heat::params {
include ::openstacklib::defaults
$client_package_name = 'python-heatclient'
if ($::os_package_type == 'debian') {
$pyvers = '3'
} else {
$pyvers = ''
}
$client_package_name = "python${pyvers}-heatclient"
$group = 'heat'
case $::osfamily {

View File

@ -19,7 +19,7 @@ describe 'heat::client' do
it 'installs heat client package' do
is_expected.to contain_package('python-heatclient').with(
:name => 'python-heatclient',
:name => platform_params[:client_package_name],
:ensure => p[:package_ensure],
:tag => 'openstack'
)
@ -35,6 +35,19 @@ describe 'heat::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-heatclient' }
else
{ :client_package_name => 'python-heatclient' }
end
when 'RedHat'
{ :client_package_name => 'python-heatclient' }
end
end
it_behaves_like 'heat client'
end
end