Fix ignored unit test cases

Change-Id: Ibb0b7bcc268752802f3413648e6828fd4999cc9b
This commit is contained in:
Takashi Kajinami 2021-01-01 17:39:20 +09:00
parent c87498ac3b
commit ce4c032d17
4 changed files with 39 additions and 23 deletions

View File

@ -8,7 +8,7 @@ describe 'neutron::agents::bigswitch' do
shared_examples 'neutron::agents::bigswitch' do shared_examples 'neutron::agents::bigswitch' do
context 'neutron bigswitch base' do context 'neutron bigswitch base' do
it 'should have' do it 'should have' do
should contain_package('python-networking-bigswitch').with( should contain_package('python3-networking-bigswitch').with(
:ensure => 'present', :ensure => 'present',
:tag => ['openstack', 'neutron-package'], :tag => ['openstack', 'neutron-package'],
) )

View File

@ -12,23 +12,31 @@
# #
# Unit tests for neutron::plugins::ml2::ovs_driver class # Unit tests for neutron::plugins::ml2::ovs_driver class
required 'spec_helper' require 'spec_helper'
describe 'neutron::plugins::ml2::ovs_driver' do describe 'neutron::plugins::ml2::ovs_driver' do
let :default_params do shared_examples 'neutron::plugins::ml2::ovs_driver' do
{ context 'when vnic_type_blacklist is not empty list' do
:vnic_type_blacklist => [] let :params do
} { :vnic_type_blacklist => ['direct'] }
end
it 'should configure direct in vnic_type_blacklist' do
should contain_neutron_plugin_ml2('ovs_driver/vnic_type_blacklist').with_value("direct")
end
end
end end
context 'when vnic_type_blacklist is not empty list' do on_supported_os({
before :each do :supported_os => OSDefaults.get_supported_os
params.merge!(:vnic_type_blacklist => ['direct']) }).each do |os,facts|
end context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts())
end
it 'should configure direct in vnic_type_blacklist' do it_behaves_like 'neutron::plugins::ml2::ovs_driver'
shoud contain_neutron_plugin_ml2('ovs_driver/vnic_type_blacklist').with_value("direct")
end end
end end
end end

View File

@ -12,23 +12,31 @@
# #
# Unit tests for neutron::plugins::ml2::sriov_driver class # Unit tests for neutron::plugins::ml2::sriov_driver class
required 'spec_helper' require 'spec_helper'
describe 'neutron::plugins::ml2::sriov_driver' do describe 'neutron::plugins::ml2::sriov_driver' do
let :default_params do shared_examples 'neutron::plugins::ml2::sriov_driver' do
{ context 'when vnic_type_blacklist is not empty list' do
:vnic_type_blacklist => [] let :params do
} { :vnic_type_blacklist => ['direct'] }
end
it 'should configure direct in vnic_type_blacklist' do
should contain_neutron_plugin_ml2('sriov_driver/vnic_type_blacklist').with_value("direct")
end
end
end end
context 'when vnic_type_blacklist is not empty list' do on_supported_os({
before :each do :supported_os => OSDefaults.get_supported_os
params.merge!(:vnic_type_blacklist => ['direct']) }).each do |os,facts|
end context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts())
end
it 'should configure direct in vnic_type_blacklist' do it_behaves_like 'neutron::plugins::ml2::sriov_driver'
shoud contain_neutron_plugin_ml2('sriov_driver/vnic_type_blacklist').with_value("direct")
end end
end end
end end