
In CentOS, we expect to have python3 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. Incorrect version handling about libreswan/openswan package is also fixed so that we have correct one in CentOS8. In addition, this patch updates test scope in tempest execution in tripleo job to avoid timeout error caused by many long-running tests. Closes-Bug: #1870257 Change-Id: I72302b58161edccb15ca008e11c670caaf94edaf
63 lines
1.7 KiB
Ruby
63 lines
1.7 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'neutron::plugins::ml2::bagpipe' do
|
|
let :default_params do
|
|
{
|
|
:bagpipe_bgp_port => '<SERVICE DEFAULT>',
|
|
:mpls_bridge => '<SERVICE DEFAULT>',
|
|
:package_ensure => 'present',
|
|
}
|
|
end
|
|
|
|
let :params do
|
|
{}
|
|
end
|
|
|
|
shared_examples 'neutron plugin bagpipe ml2' do
|
|
before do
|
|
params.merge!(default_params)
|
|
end
|
|
|
|
it 'should have' do
|
|
should contain_package('python-networking-bagpipe').with(
|
|
:name => platform_params[:bagpipe_package_name],
|
|
:ensure => params[:package_ensure],
|
|
:tag => 'openstack'
|
|
)
|
|
end
|
|
|
|
it 'configures bagpipe settings' do
|
|
should contain_neutron_plugin_ml2('bagpipe/bagpipe_bgp_port').with_value(params[:bagpipe_bgp_port])
|
|
should contain_neutron_plugin_ml2('bagpipe/mpls_bridge').with_value(params[:mpls_bridge])
|
|
end
|
|
end
|
|
|
|
on_supported_os({
|
|
:supported_os => OSDefaults.get_supported_os
|
|
}).each do |os,facts|
|
|
context "on #{os}" do
|
|
let (:facts) do
|
|
facts.merge(OSDefaults.get_facts())
|
|
end
|
|
|
|
let (:platform_params) do
|
|
case facts[:osfamily]
|
|
when 'Debian'
|
|
{ :bagpipe_package_name => 'python3-networking-bagpipe' }
|
|
when 'RedHat'
|
|
if facts[:operatingsystem] == 'Fedora'
|
|
{ :bagpipe_package_name => 'python3-networking-bagpipe' }
|
|
else
|
|
if facts[:operatingsystemmajrelease] > '7'
|
|
{ :bagpipe_package_name => 'python3-networking-bagpipe' }
|
|
else
|
|
{ :bagpipe_package_name => 'python-networking-bagpipe' }
|
|
end
|
|
end
|
|
end
|
|
end
|
|
it_behaves_like 'neutron plugin bagpipe ml2'
|
|
end
|
|
end
|
|
end
|