forked from puppetlabs/puppetlabs-apache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvhosts_spec.rb
35 lines (34 loc) · 1.1 KB
/
vhosts_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
require 'spec_helper'
describe 'apache::vhosts', :type => :class do
context 'on all OSes' do
let :facts do
{
:id => 'root',
:kernel => 'Linux',
:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
:operatingsystemrelease => '6',
:concat_basedir => '/dne',
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
:is_pe => false,
}
end
context 'with custom vhosts parameter' do
let :params do {
:vhosts => {
'custom_vhost_1' => {
'docroot' => '/var/www/custom_vhost_1',
'port' => '81',
},
'custom_vhost_2' => {
'docroot' => '/var/www/custom_vhost_2',
'port' => '82',
},
},
}
end
it { is_expected.to contain_apache__vhost('custom_vhost_1') }
it { is_expected.to contain_apache__vhost('custom_vhost_2') }
end
end
end