3 describe 'apache::mod::alias', :type => :class do
7 context "on a Debian OS", :compile do
12 :lsbdistcodename => 'squeeze',
13 :osfamily => 'Debian',
14 :operatingsystem => 'Debian',
15 :operatingsystemrelease => '6',
16 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
17 :concat_basedir => '/dne',
21 it { is_expected.to contain_apache__mod("alias") }
22 it { is_expected.to contain_file("alias.conf").with(:content => /Alias \/icons\/ "\/usr\/share\/apache2\/icons\/"/) }
24 context "on a RedHat 6-based OS", :compile do
29 :osfamily => 'RedHat',
30 :operatingsystem => 'RedHat',
31 :operatingsystemrelease => '6',
32 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
33 :concat_basedir => '/dne',
37 it { is_expected.to contain_apache__mod("alias") }
38 it { is_expected.to contain_file("alias.conf").with(:content => /Alias \/icons\/ "\/var\/www\/icons\/"/) }
40 context "on a RedHat 7-based OS", :compile do
45 :osfamily => 'RedHat',
46 :operatingsystem => 'RedHat',
47 :operatingsystemrelease => '7',
48 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
49 :concat_basedir => '/dne',
53 it { is_expected.to contain_apache__mod("alias") }
54 it { is_expected.to contain_file("alias.conf").with(:content => /Alias \/icons\/ "\/usr\/share\/httpd\/icons\/"/) }
56 context "with icons options", :compile do
58 'class { apache: default_mods => false }'
64 :osfamily => 'RedHat',
65 :operatingsystem => 'RedHat',
66 :operatingsystemrelease => '7',
67 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
68 :concat_basedir => '/dne',
74 'icons_options' => 'foo'
77 it { is_expected.to contain_apache__mod("alias") }
78 it { is_expected.to contain_file("alias.conf").with(:content => /Options foo/) }
80 context "on a FreeBSD OS", :compile do
85 :osfamily => 'FreeBSD',
86 :operatingsystem => 'FreeBSD',
87 :operatingsystemrelease => '10',
88 :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
89 :concat_basedir => '/dne',
93 it { is_expected.to contain_apache__mod("alias") }
94 it { is_expected.to contain_file("alias.conf").with(:content => /Alias \/icons\/ "\/usr\/local\/www\/apache24\/icons\/"/) }