Skip to content

Instantly share code, notes, and snippets.

@cjeanneret
Last active December 5, 2017 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjeanneret/b5f8cc093261eeb620f941f38dc96e01 to your computer and use it in GitHub Desktop.
Save cjeanneret/b5f8cc093261eeb620f941f38dc96e01 to your computer and use it in GitHub Desktop.
# HAProxy endpoints
tripleo.dynamic_stuff.haproxy_endpoints:
neutron: {}
starwars:
authorized_userlist: 'starwars'
tripleo.dynamic_stuff.haproxy_userlist:
starwars:
users:
- 'leia insecure-password sister'
- 'sith password $5$h9LsKUOeCr$UlD62CNEpuZQkGYdBoiFJLsM6TlXluRLBlhEnpjDdaC'
require 'spec_helper'
describe 'tripleo::haproxy::service_endpoints' do
let(:title) { 'dynamic_stuff' }
let :pre_condition do
'include ::haproxy'
end
shared_examples_for 'tripleo haproxy service_endpoints' do
context 'with basic parameters to configure neutron binding' do
it 'should compile' do
is_expected.to compile.with_all_deps
end
it 'should configure haproxy' do
is_expected.to contain_tripleo__haproxy__endpoint('starwars')
end
end
end
context 'on Debian platforms' do
let :facts do
{ :osfamily => 'Debian',
:hostname => 'myhost' }
end
it_configures 'tripleo haproxy service_endpoints'
end
context 'on RedHat platforms' do
let :facts do
{ :osfamily => 'RedHat',
:hostname => 'myhost' }
end
it_configures 'tripleo haproxy service_endpoints'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment