Browse Source

Expect python3 packages in CentOS8 and Fedora

Change-Id: I456b1b8da7fc234422ff6be454e218847b58b42c
changes/73/716273/3
Takashi Kajinami 2 years ago
parent
commit
2fdcfb5b71
  1. 26
      spec/defines/oslo_cache_spec.rb
  2. 26
      spec/defines/oslo_db_spec.rb

26
spec/defines/oslo_cache_spec.rb

@ -141,22 +141,26 @@ describe 'oslo::cache' do
let (:facts) do
facts.merge!(OSDefaults.get_facts())
end
let(:platform_params) do
case facts[:osfamily]
when 'Debian'
platform_params = { :pylibmc_package_name => 'python3-pylibmc' }
when 'RedHat'
platform_params = { :pylibmc_package_name => 'python-pylibmc' }
end
let(:platform_params) do
case facts[:osfamily]
when 'Debian'
platform_params[:python_memcache_package_name] = 'python3-memcache'
{ :pylibmc_package_name => 'python3-pylibmc',
:python_memcache_package_name => 'python3-memcache' }
when 'RedHat'
platform_params[:python_memcache_package_name] = 'python-memcached'
if facts[:operatingsystem] == 'Fedora'
{ :pylibmc_package_name => 'python3-pylibmc',
:python_memcache_package_name => 'python3-memcached' }
else
if facts[:operatingsystemmajrelease] > '7'
{ :pylibmc_package_name => 'python3-pylibmc',
:python_memcache_package_name => 'python3-memcached' }
else
{ :pylibmc_package_name => 'python-pylibmc',
:python_memcache_package_name => 'python-memcached' }
end
end
end
platform_params
end
it_behaves_like 'oslo-cache'

26
spec/defines/oslo_db_spec.rb

@ -248,11 +248,27 @@ describe 'oslo::db' do
:pysqlite2_package_name => 'python3-pysqlite2',
}
when 'RedHat'
{
:pymongo_package_name => 'python-pymongo',
:pymysql_package_name => nil,
:pysqlite2_package_name => nil,
}
if facts[:operatingsystem] == 'Fedora'
{
:pymongo_package_name => 'python3-pymongo',
:pymysql_package_name => nil,
:pysqlite2_package_name => nil,
}
else
if facts[:operatingsystemmajrelease] > '7'
{
:pymongo_package_name => 'python3-pymongo',
:pymysql_package_name => nil,
:pysqlite2_package_name => nil,
}
else
{
:pymongo_package_name => 'python-pymongo',
:pymysql_package_name => nil,
:pysqlite2_package_name => nil,
}
end
end
end
end

Loading…
Cancel
Save