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: I8eb45995e8eecf58b431eb93b70563394839bb90
This commit is contained in:
Takashi Kajinami 2020-03-31 22:37:09 +09:00
parent 4bea5ae6ff
commit c78519cac8
1 changed files with 9 additions and 1 deletions

View File

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