Mercurial > repos > other > Puppet
comparison modules/apache/spec/defines/vhost_custom_spec.rb @ 257:675c1cc61eaf
Update Apache module to get CentOS 8 support
Unfortunately it only fixes some bits. mod_wsgi still needs
other approaches
This also overrides the vhost modification to make them come last
in the import order (after module loading)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 22 Dec 2019 14:43:29 -0500 |
parents | |
children | d9352a684e62 |
comparison
equal
deleted
inserted
replaced
252:47750947f4dc | 257:675c1cc61eaf |
---|---|
1 require 'spec_helper' | |
2 | |
3 describe 'apache::vhost::custom', :type => :define do | |
4 let :title do | |
5 'rspec.example.com' | |
6 end | |
7 let :default_params do | |
8 { | |
9 :content => 'foobar' | |
10 } | |
11 end | |
12 describe 'os-dependent items' do | |
13 context "on RedHat based systems" do | |
14 let :default_facts do | |
15 { | |
16 :osfamily => 'RedHat', | |
17 :operatingsystemrelease => '6', | |
18 :operatingsystem => 'RedHat', | |
19 :concat_basedir => '/dne', | |
20 :id => 'root', | |
21 :kernel => 'Linux', | |
22 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', | |
23 :is_pe => false, | |
24 } | |
25 end | |
26 let :params do default_params end | |
27 let :facts do default_facts end | |
28 end | |
29 context "on Debian based systems" do | |
30 let :default_facts do | |
31 { | |
32 :osfamily => 'Debian', | |
33 :operatingsystemrelease => '6', | |
34 :lsbdistcodename => 'squeeze', | |
35 :operatingsystem => 'Debian', | |
36 :concat_basedir => '/dne', | |
37 :id => 'root', | |
38 :kernel => 'Linux', | |
39 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', | |
40 :is_pe => false, | |
41 } | |
42 end | |
43 let :params do default_params end | |
44 let :facts do default_facts end | |
45 it { is_expected.to contain_file("apache_rspec.example.com").with( | |
46 :ensure => 'present', | |
47 :content => 'foobar', | |
48 :path => '/etc/apache2/sites-available/25-rspec.example.com.conf', | |
49 ) } | |
50 it { is_expected.to contain_file("25-rspec.example.com.conf symlink").with( | |
51 :ensure => 'link', | |
52 :path => '/etc/apache2/sites-enabled/25-rspec.example.com.conf', | |
53 :target => '/etc/apache2/sites-available/25-rspec.example.com.conf' | |
54 ) } | |
55 end | |
56 context "on FreeBSD systems" do | |
57 let :default_facts do | |
58 { | |
59 :osfamily => 'FreeBSD', | |
60 :operatingsystemrelease => '9', | |
61 :operatingsystem => 'FreeBSD', | |
62 :concat_basedir => '/dne', | |
63 :id => 'root', | |
64 :kernel => 'FreeBSD', | |
65 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', | |
66 :is_pe => false, | |
67 } | |
68 end | |
69 let :params do default_params end | |
70 let :facts do default_facts end | |
71 it { is_expected.to contain_file("apache_rspec.example.com").with( | |
72 :ensure => 'present', | |
73 :content => 'foobar', | |
74 :path => '/usr/local/etc/apache24/Vhosts/25-rspec.example.com.conf', | |
75 ) } | |
76 end | |
77 context "on Gentoo systems" do | |
78 let :default_facts do | |
79 { | |
80 :osfamily => 'Gentoo', | |
81 :operatingsystem => 'Gentoo', | |
82 :operatingsystemrelease => '3.16.1-gentoo', | |
83 :concat_basedir => '/dne', | |
84 :id => 'root', | |
85 :kernel => 'Linux', | |
86 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin', | |
87 :is_pe => false, | |
88 } | |
89 end | |
90 let :params do default_params end | |
91 let :facts do default_facts end | |
92 it { is_expected.to contain_file("apache_rspec.example.com").with( | |
93 :ensure => 'present', | |
94 :content => 'foobar', | |
95 :path => '/etc/apache2/vhosts.d/25-rspec.example.com.conf', | |
96 ) } | |
97 end | |
98 end | |
99 end |