puppet-midonet/spec/classes/midonet_gateway_static_spec.rb
Alejandro Andreu f0324311a0 Adds GW type/class (both BGP and static uplinks)
Change-Id: I52a6cce14566469d67c07fd488972a245bc7b73f
2016-07-26 15:52:50 +02:00

30 lines
977 B
Ruby

require 'spec_helper'
describe 'midonet::gateway::static' do
context 'with parameters' do
let :facts do
{
:osfamily => 'Debian',
:lsbdistid => 'Ubuntu',
:lsbdistrelease => '16.04',
}
end
let :params do
{
:network_id => 'example_netid',
:cidr => '200.0.0.1/24',
:gateway_ip => '200.0.0.1',
:service_host => '127.0.0.1',
:service_dir => '/tmp/status',
:zookeeper_hosts => [ { 'ip' => '127.0.0.1', 'port' => '2181' } ],
:api_port => '8181'
}
end
it { is_expected.to contain_package('screen').with_ensure('installed') }
it { is_expected.to contain_file('fake_uplink_script').with_ensure('present') }
it { is_expected.to contain_file('midorc').with_ensure('present') }
it { is_expected.to contain_file('functions').with_ensure('present') }
it { is_expected.to contain_exec('/bin/bash /tmp/create_fake_uplink_l2.sh') }
end
end