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: I4a4e2f2a1d675c5feb25bb6cb2a139cc42d845a6
This commit is contained in:
Takashi Kajinami 2020-04-07 12:35:00 +09:00
parent 844017b6f2
commit ce810936d3

View File

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