-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathlbmethod_byrequests_spec.rb
37 lines (33 loc) · 1.07 KB
/
lbmethod_byrequests_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# frozen_string_literal: true
require 'spec_helper'
describe 'apache::mod::lbmethod_byrequests', type: :class do
context 'on a Debian OS' do
include_examples 'Debian 11'
context 'with Apache version >= 2.4' do
let :params do
{
apache_version: '2.4'
}
end
it { is_expected.to contain_class('apache::mod::proxy_balancer') }
it { is_expected.to contain_apache__mod('lbmethod_byrequests') }
it {
is_expected.to contain_file('lbmethod_byrequests.load').with(
{
path: '/etc/apache2/mods-available/lbmethod_byrequests.load',
content: "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n",
},
)
}
it {
is_expected.to contain_file('lbmethod_byrequests.load symlink').with(
{
ensure: 'link',
path: '/etc/apache2/mods-enabled/lbmethod_byrequests.load',
target: '/etc/apache2/mods-available/lbmethod_byrequests.load',
},
)
}
end
end
end