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: I5a8b41e5a8281f7f8643c4bdbd8c38cd62df3688
This commit is contained in:
Takashi Kajinami 2020-03-31 16:45:55 +09:00
parent 5a89c5a002
commit 947da56b58
1 changed files with 9 additions and 1 deletions

View File

@ -31,7 +31,15 @@ describe 'mistral::client' do
when 'Debian'
{ :client_package => 'python3-mistralclient' }
when 'RedHat'
{ :client_package => 'python-mistralclient' }
if facts[:operatingsystem] == 'Fedora'
{ :client_package => 'python3-mistralclient' }
else
if facts[:operatingsystemmajrelease] > '7'
{ :client_package => 'python3-mistralclient' }
else
{ :client_package => 'python-mistralclient' }
end
end
end
end