Expect python3 client package in CentOS8

In CentOS, we expect to have python3 client package in 8.x while we
expect to have python2 in 7.x .
Fix unit tests to expect the correct version according to os major
version.

Change-Id: I5e3c618b389ac3dc4a72d5941538e8c8f3197746
This commit is contained in:
Takashi Kajinami 2020-03-31 17:20:17 +09:00
parent ac462fa124
commit c93e74ab27

View File

@ -46,9 +46,17 @@ describe 'sahara::client' do
when 'Debian'
{ :client_package_name => 'python3-saharaclient' }
when 'RedHat'
if facts[:operatingsystem] == 'Fedora'
{ :client_package_name => 'python3-saharaclient' }
else
if facts[:operatingsystemmajrelease] > '7'
{ :client_package_name => 'python3-saharaclient' }
else
{ :client_package_name => 'python-saharaclient' }
end
end
end
end
it_configures 'sahara client'
end