Fix unused test case of neutron::plugins::ml2::arista::l3
... and cover more parameters of the class. Change-Id: Id3180bbfb261006955bcc6a0dfd5711502c48768
This commit is contained in:
parent
e046811edb
commit
0e228220dd
@ -46,31 +46,32 @@ describe 'neutron::plugins::ml2::arista::l3' do
|
||||
end
|
||||
|
||||
shared_examples 'neutron plugin ml2 arista l3_arista' do
|
||||
before do
|
||||
params.merge!(default_params)
|
||||
let :p do
|
||||
default_params.merge(params)
|
||||
end
|
||||
|
||||
it 'configures ml2 arista l3_arista settings' do
|
||||
should contain_neutron_plugin_ml2('l3_arista/primary_l3_host').with_value(params[:primary_l3_host])
|
||||
should contain_neutron_plugin_ml2('l3_arista/primary_l3_host_username').with_value(params[:primary_l3_host_username])
|
||||
should contain_neutron_plugin_ml2('l3_arista/primary_l3_host_password').with_value(params[:primary_l3_host_password]).with_secret(true)
|
||||
end
|
||||
should contain_neutron_plugin_ml2('l3_arista/primary_l3_host').with_value(p[:primary_l3_host])
|
||||
should contain_neutron_plugin_ml2('l3_arista/primary_l3_host_username').with_value(p[:primary_l3_host_username])
|
||||
should contain_neutron_plugin_ml2('l3_arista/primary_l3_host_password').with_value(p[:primary_l3_host_password]).with_secret(true)
|
||||
should contain_neutron_plugin_ml2('l3_arista/secondary_l3_host').with_value(p[:secondary_l3_host])
|
||||
should contain_neutron_plugin_ml2('l3_arista/mlag_config').with_value(p[:mlag_config])
|
||||
should contain_neutron_plugin_ml2('l3_arista/l3_sync_interval').with_value(p[:l3_sync_interval])
|
||||
should contain_neutron_plugin_ml2('l3_arista/use_vrf').with_value(p[:use_vrf])
|
||||
end
|
||||
|
||||
shared_examples 'ml2 l3_arista should fail when mlag is true and secondary is service default' do
|
||||
let :params do
|
||||
{}
|
||||
context 'with mlag enabled but secondary l3 host missing' do
|
||||
before :each do
|
||||
params.merge!({
|
||||
:mlag_config => true
|
||||
})
|
||||
end
|
||||
|
||||
before do
|
||||
params.merge!(default_params)
|
||||
params[:mlag_config] = true
|
||||
end
|
||||
|
||||
it 'should fail when mlag is true and secondary l3 host is service default' do
|
||||
it 'should fail' do
|
||||
should raise_error(Puppet::Error, /Must set secondary_l3_host when mlag_config is true./)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
|
Loading…
Reference in New Issue
Block a user