puppet-neutron/spec/classes/neutron_plugins_ml2_midonet_spec.rb
ZhongShengping b9e73b3099 Remove deprecated rabbit params
Remove the deprecated rabbit params which has been deprecated for
two years. The default_transport_url has been present for a while
now and should be used.

Change-Id: I6b239ffca2184f553311428b92cd7043b4289b63
2018-06-11 09:53:19 +08:00

72 lines
1.7 KiB
Ruby

#
# Unit tests for neutron::plugins::ml2::midonet class
#
require 'spec_helper'
describe 'neutron::plugins::ml2::midonet' do
let :pre_condition do
"class { '::neutron::keystone::authtoken':
password => 'passw0rd',
}
class { 'neutron::server': }
class { 'neutron':
core_plugin => 'ml2' }"
end
let :default_params do
{
:midonet_uri => 'http://localhost:8080/midonet-api',
:username => 'admin',
:password => 'passw0rd',
:project_id => 'admin',
}
end
let :params do
{}
end
let :test_facts do
{ :operatingsystem => 'default',
:operatingsystemrelease => 'default',
:concat_basedir => '/',
}
end
shared_examples_for 'neutron ml2 midonet plugin' do
before do
params.merge!(default_params)
end
it { is_expected.to contain_class('neutron::params') }
it do
is_expected.to contain_neutron_plugin_ml2('MIDONET/midonet_uri').with_value(params[:midonet_uri])
is_expected.to contain_neutron_plugin_ml2('MIDONET/username').with_value(params[:username])
is_expected.to contain_neutron_plugin_ml2('MIDONET/password').with_value(params[:password])
is_expected.to contain_neutron_plugin_ml2('MIDONET/project_id').with_value(params[:project_id])
end
end
begin
context 'on RedHat platforms' do
let :facts do
@default_facts.merge(test_facts.merge({
:osfamily => 'RedHat',
:operatingsystemrelease => '7'
}))
end
let :platform_params do
{ :midonet_ml2_config_file => '/etc/neutron/conf.d/neutron-server/ml2_mech_midonet.conf' }
end
it_configures 'neutron ml2 midonet plugin'
end
end
end