puppet-neutron/spec/classes/neutron_plugins_ml2_mellanox_spec.rb
Moshe Levi beb372b1fe Add support to networking-mlnx ml2 drivers
Change-Id: Ife22d7c113c33d6e42a94b9d6c32ed8cb61d6488
Co-authored-by: Hamdy Khader <hamdyk@mellanox.com>
2018-03-08 11:17:42 +00:00

63 lines
1.3 KiB
Ruby

require 'spec_helper'
describe 'neutron::plugins::ml2::mellanox' do
let :pre_condition do
"class { '::neutron::keystone::authtoken':
password => 'passw0rd',
}
class { 'neutron::server': }
class { 'neutron':
rabbit_password => 'passw0rd',
core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }"
end
let :default_params do
{
:package_ensure => 'present'
}
end
let :params do
{}
end
let :test_facts do
{
:operatingsystem => 'default',
:operatingsystemrelease => 'default',
:concat_basedir => '/',
}
end
shared_examples_for 'neutron plugin mellanox ml2' do
before do
params.merge!(default_params)
end
it { is_expected.to contain_class('neutron::params') }
it 'should have' do
is_expected.to contain_package('python-networking-mlnx').with(
:ensure => params[:package_ensure],
:tag => ['openstack', 'neutron-package']
)
end
end
begin
context 'on RedHat platforms' do
let :facts do
OSDefaults.get_facts.merge(test_facts.merge({
:osfamily => 'RedHat',
:operatingsystemrelease => '7'
}))
end
it_configures 'neutron plugin mellanox ml2'
end
end
end