Browse Source

Merge "Expect python3 packages in CentOS8 and Fedora"

tags/16.2.0
Zuul 3 months ago
committed by Gerrit Code Review
parent
commit
fed1907523
2 changed files with 36 additions and 16 deletions
  1. +15
    -11
      spec/defines/oslo_cache_spec.rb
  2. +21
    -5
      spec/defines/oslo_db_spec.rb

+ 15
- 11
spec/defines/oslo_cache_spec.rb View File

@@ -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'


+ 21
- 5
spec/defines/oslo_db_spec.rb View File

@@ -245,11 +245,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