puppet-vswitch/spec/acceptance/basic_vswitch_spec.rb
Babu Shanmugam 7d1ff4325e Added custom type vs_config and OVS provider for it
vs_config checks and updates the columns in Open_vSwitch table.
Records are updated only when the value differs from the one set
in 'value' parameter.

This will be used by projects like OVN which depends on the
global configs to even boot up

Change-Id: I87f870463147b41a319f1fc6c4225c35d244e3b9
2016-03-22 09:05:06 +00:00

45 lines
1.0 KiB
Ruby

require 'spec_helper_acceptance'
describe 'basic vswitch' do
context 'default parameters' do
it 'should work with no errors' do
pp= <<-EOS
include ::openstack_integration
include ::openstack_integration::repos
include ::vswitch::ovs
vs_bridge { 'br-beaker':
ensure => present,
}
vs_config { 'external_ids:ovn-remote':
ensure => present,
value => 'tcp:127.0.0.1:2300',
}
EOS
# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)
end
describe command('ovs-vsctl show') do
describe '#stdout' do
subject { super().stdout }
it { is_expected.to match /br-beaker/ }
end
end
describe command('ovs-vsctl get Open_vSwitch . external_ids:ovn-remote') do
describe '#stdout' do
subject { super().stdout }
it { is_expected.to match /\"tcp:127.0.0.1:2300\"/ }
end
end
end
end