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: Ic8867012593c70d119dfbe0980e13364f782cdf8
This commit is contained in:
Takashi Kajinami 2020-04-01 16:16:16 +09:00
parent 92e2f223b6
commit 704822c28f
1 changed files with 9 additions and 1 deletions

View File

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