b42197bfd5
This change pulls in the upstream commit eef121eddf659e66e13157033496def216d69af4 to make the haproxy module rspec-puppet 2 compatible so that they can pass under our openstack-infra tests. Additionally we are updating the rspec-core to ~> 3.3 to be consistent with the other modules in fuel-library. Change-Id: I93800486b5d8e0f4cd06e6d583d8fecfa28d9a52 Closes-Bug: #1508983
37 lines
917 B
Ruby
37 lines
917 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'haproxy::backend' do
|
|
let(:pre_condition) { 'include haproxy' }
|
|
let(:facts) do
|
|
{
|
|
:ipaddress => '1.1.1.1',
|
|
:osfamily => 'Redhat',
|
|
:concat_basedir => '/dne',
|
|
}
|
|
end
|
|
|
|
context "when no options are passed" do
|
|
let(:title) { 'bar' }
|
|
|
|
it { should contain_concat__fragment('bar_backend_block').with(
|
|
'order' => '20-bar-00',
|
|
'target' => '/etc/haproxy/haproxy.cfg',
|
|
'content' => "\nbackend bar\n balance roundrobin\n option tcplog\n option ssl-hello-chk\n"
|
|
) }
|
|
end
|
|
|
|
# C9953
|
|
context "when a listen is created with the same name" do
|
|
let(:title) { 'apache' }
|
|
let(:pre_condition) do
|
|
"haproxy::listen { 'apache': ports => '443', }"
|
|
end
|
|
|
|
it 'should raise error' do
|
|
expect { catalogue }.to raise_error Puppet::Error, /discovered with the same name/
|
|
end
|
|
end
|
|
|
|
# C9956 WONTFIX
|
|
end
|