2f7d622b0a
Moved to on_supported_os instead of hard-coded list Change-Id: Id501931b7cb32463680cc861ab4e70230e2d98d1
38 lines
886 B
Ruby
38 lines
886 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'tripleo::haproxy::service_endpoints' do
|
|
|
|
|
|
let :pre_condition do
|
|
'include ::haproxy'
|
|
end
|
|
|
|
shared_examples_for 'tripleo haproxy service_endpoints' do
|
|
context 'with basic parameters to configure neutron binding' do
|
|
let(:title) { 'dynamic-stuff' }
|
|
it 'should compile' do
|
|
is_expected.to compile.with_all_deps
|
|
end
|
|
it 'should configure haproxy' do
|
|
is_expected.to contain_tripleo__haproxy__endpoint('neutron')
|
|
end
|
|
end
|
|
context 'with non-existent hiera entry' do
|
|
let(:title) { 'non-existent' }
|
|
it 'should compile' do
|
|
is_expected.to compile.with_all_deps
|
|
end
|
|
end
|
|
end
|
|
|
|
on_supported_os.each do |os, facts|
|
|
context "on #{os}" do
|
|
let(:facts) do
|
|
facts.merge({})
|
|
end
|
|
|
|
it_behaves_like 'tripleo haproxy service_endpoints'
|
|
end
|
|
end
|
|
end
|