Skip to content

Commit 2425abf

Browse files
author
Morgan Haskel
committed
Merge pull request #830 from roidelapluie/Allow-multiple-balancermember-with-the-same-url
Allow multiple balancermember with the same url
2 parents 06974f7 + 4a8b692 commit 2425abf

2 files changed

Lines changed: 37 additions & 1 deletion

File tree

manifests/balancermember.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
$options = [],
4646
) {
4747

48-
concat::fragment { "BalancerMember ${url}":
48+
concat::fragment { "BalancerMember ${name}":
4949
ensure => present,
5050
target => "${::apache::params::confd_dir}/balancer_${balancer_cluster}.conf",
5151
content => inline_template(" BalancerMember ${url} <%= @options.join ' ' %>\n"),
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
require 'spec_helper'
2+
3+
describe 'apache::balancermember', :type => :define do
4+
let :pre_condition do
5+
'include apache
6+
apache::balancer {"balancer":}
7+
apache::balancer {"balancer-external":}
8+
apache::balancermember {"http://127.0.0.1:8080-external": url => "http://127.0.0.1:8080/", balancer_cluster => "balancer-external"}
9+
'
10+
end
11+
let :title do
12+
'http://127.0.0.1:8080/'
13+
end
14+
let :params do
15+
{
16+
:options => [],
17+
:url => 'http://127.0.0.1:8080/',
18+
:balancer_cluster => 'balancer-internal'
19+
}
20+
end
21+
let :facts do
22+
{
23+
:osfamily => 'Debian',
24+
:operatingsystem => 'Debian',
25+
:operatingsystemrelease => '6',
26+
:lsbdistcodename => 'squeeze',
27+
:id => 'root',
28+
:concat_basedir => '/dne',
29+
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
30+
:kernel => 'Linux',
31+
}
32+
end
33+
describe "allows multiple balancermembers with the same url" do
34+
it { should contain_concat__fragment('BalancerMember http://127.0.0.1:8080/') }
35+
end
36+
end

0 commit comments

Comments
 (0)