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: Idf72ee853fbbafc883be7526eef0c6098b4506ea
This commit is contained in:
Takashi Kajinami 2020-03-31 17:09:10 +09:00
parent c7ce5143b9
commit 6d8a18b9e6
1 changed files with 9 additions and 1 deletions

View File

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