puppet-midonet/spec/classes/midonet_gateway_static_spec.rb
Alejandro Andreu 5dda1b954f Configure static uplink ifaces on startup in RHEL7
Change-Id: Icebf6efae7326de6fb7bdae68a91e65eb6f3a147
2017-03-08 12:22:15 +01:00

32 lines
987 B
Ruby

require 'spec_helper'
describe 'midonet::gateway::static' do
context 'with parameters' do
let :facts do
{
:osfamily => 'Debian',
:lsbdistid => 'Ubuntu',
:lsbdistrelease => '16.04',
:puppetversion => Puppet.version
}
end
let :params do
{
:nic => 'enp0s3',
:fip => '200.200.200.0/24',
:edge_router => 'edge-router',
:veth0_ip => '172.19.0.1',
:veth1_ip => '172.19.0.2',
:veth_network => '172.19.0.0/30',
:scripts_dir => '/tmp',
:uplink_script => 'create_fake_uplink_l2.sh',
:ensure_scripts => 'present',
}
end
it { is_expected.to contain_file('fake_uplink_script').with_ensure('present') }
it { is_expected.to contain_exec('run gateway static creation script').with(
'command' => '/bin/bash -x /tmp/create_fake_uplink_l2.sh 2>&1 | tee /tmp/create_fake_uplink_l2.sh.out'
) }
end
end