forked from theforeman/puppet-pulp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpulp_apache_plugin_spec.rb
42 lines (35 loc) · 1 KB
/
pulp_apache_plugin_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
38
39
40
41
42
require 'spec_helper'
describe 'pulp::apache_plugin' do
let :title do
'python'
end
let :pre_condition do
'service { "httpd": }'
end
context 'with default parameters' do
it { is_expected.to compile.with_all_deps }
it do
verify_exact_contents(catalogue, '/etc/httpd/conf.d/pulp_python.conf', [
'Alias /pulp/python /var/www/pub/python/',
'<Directory /var/www/pub/python>',
' Options FollowSymLinks Indexes',
' DirectoryIndex index.html index.json',
'</Directory>',
])
end
it do
verify_exact_contents(catalogue, '/etc/pulp/vhosts80/python.conf', [])
end
end
context 'with parameters set to false' do
let :params do
{
:confd => false,
:vhosts80 => false,
}
end
it { is_expected.to compile.with_all_deps }
it { is_expected.not_to contain_file('/etc/httpd/conf.d/pulp_python.conf') }
it { is_expected.not_to contain_file('/etc/pulp/vhosts80/python.conf') }
end
end