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: Ie02f59aa876c5b3c9de7cd051551b9ef5f7cc087
This commit is contained in:
Takashi Kajinami 2020-03-31 17:10:59 +09:00
parent 153fe8570b
commit 00290157ac
1 changed files with 9 additions and 1 deletions

View File

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