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: Ic89bf2514d82676ee8fde95284a3414bd51d5af1
This commit is contained in:
Takashi Kajinami
2020-03-31 22:18:08 +09:00
parent 3588e8a05e
commit 976c6cf64f

View File

@@ -29,7 +29,15 @@ describe 'cloudkitty::client' do
when 'Debian'
{ :client_package_name => 'python3-cloudkittyclient' }
when 'RedHat'
{ :client_package_name => 'python-cloudkittyclient' }
if facts[:operatingsystem] == 'Fedora'
{ :client_package_name => 'python3-cloudkittyclient' }
else
if facts[:operatingsystemmajrelease] > '7'
{ :client_package_name => 'python3-cloudkittyclient' }
else
{ :client_package_name => 'python-cloudkittyclient' }
end
end
end
end