puppet-neutron/spec/functions/validate_vxlan_udp_port_spec.rb
Tobias Urdin 37bb654424 Use puppet4 functions-api
Change-Id: Id124ec4c598c7b6bcb7c8134d75825fd01d938d2
2018-12-18 10:32:11 +00:00

40 lines
983 B
Ruby

require 'spec_helper'
describe 'validate_vxlan_udp_port' do
it 'exists' do
is_expected.not_to eq(nil)
end
it 'fails with port too high integer' do
is_expected.to run.with_params(65536).and_raise_error(Puppet::Error)
end
it 'fails with a well known port integer' do
is_expected.to run.with_params(90).and_raise_error(Puppet::Error)
end
it 'fails with a well known port string' do
is_expected.to run.with_params('90').and_raise_error(Puppet::Error)
end
it 'fails with port too high string' do
is_expected.to run.with_params('65536').and_raise_error(Puppet::Error)
end
it 'works with default port integer' do
is_expected.to run.with_params(4789)
end
it 'works with default port string' do
is_expected.to run.with_params('4789')
end
it 'works with a private port integer' do
is_expected.to run.with_params(49155)
end
it 'works with a private port string' do
is_expected.to run.with_params('49155')
end
end