Skip to content

Commit 4fe8892

Browse files
author
Morgan Haskel
committed
Fix vhost and mod_passenger tests on deb7
Also fix broken tests with strict variables.
1 parent bb849cd commit 4fe8892

File tree

4 files changed

+32
-24
lines changed

4 files changed

+32
-24
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,6 +1745,8 @@ Creates URL [`rewrites`](#rewrites) rules in vhost directories. Expects an array
17451745
}
17461746
```
17471747

1748+
***Note*** If you include rewrites in your directories make sure you are also including `apache::mod::rewrite`. You may also want to consider setting the rewrites using the `rewrites` parameter in `apache::vhost` rather than setting the rewrites in the vhost directories.
1749+
17481750
######`shib_request_setting`
17491751

17501752
Allows an valid content setting to be set or altered for the application request. This command takes two parameters, the name of the content setting, and the value to set it to.Check the Shibboleth [content setting documentation](https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPContentSettings) for valid settings. This key is disabled if `apache::mod::shib` is not defined. Check the [`mod_shib` documentation](https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPApacheConfig#NativeSPApacheConfig-Server/VirtualHostOptions) for more details.

spec/acceptance/mod_passenger_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class { 'apache::mod::passenger': }
137137
end
138138

139139
it 'should output status via passenger-memory-stats' do
140-
shell("sudo /usr/sbin/passenger-memory-stats") do |r|
140+
shell("/usr/sbin/passenger-memory-stats") do |r|
141141
expect(r.stdout).to match(/Apache processes/)
142142
expect(r.stdout).to match(/Nginx processes/)
143143
expect(r.stdout).to match(/Passenger processes/)
@@ -262,7 +262,7 @@ class { 'apache::mod::passenger':
262262
end
263263

264264
it 'should output status via passenger-memory-stats' do
265-
shell("sudo /usr/bin/passenger-memory-stats", :pty => true) do |r|
265+
shell("/usr/bin/passenger-memory-stats", :pty => true) do |r|
266266
expect(r.stdout).to match(/Apache processes/)
267267
expect(r.stdout).to match(/Nginx processes/)
268268
expect(r.stdout).to match(/Passenger processes/)

spec/acceptance/vhost_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,9 @@ class { 'apache': }
991991
pp = <<-EOS
992992
class { 'apache': }
993993
host { 'test.server': ip => '127.0.0.1' }
994+
if ! defined(Class['apache::mod::rewrite']) {
995+
include ::apache::mod::rewrite
996+
}
994997
apache::vhost { 'test.server':
995998
docroot => '/tmp',
996999
directories => [

spec/classes/mod/dav_svn_spec.rb

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
context "on a Debian OS" do
88
let :facts do
99
{
10-
:lsbdistcodename => 'squeeze',
11-
:osfamily => 'Debian',
12-
:operatingsystemrelease => '6',
13-
:concat_basedir => '/dne',
14-
:operatingsystem => 'Debian',
15-
:id => 'root',
16-
:kernel => 'Linux',
17-
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
10+
:lsbdistcodename => 'squeeze',
11+
:osfamily => 'Debian',
12+
:operatingsystemrelease => '6',
13+
:operatingsystemmajrelease => '6',
14+
:concat_basedir => '/dne',
15+
:operatingsystem => 'Debian',
16+
:id => 'root',
17+
:kernel => 'Linux',
18+
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
1819
}
1920
end
2021
it { is_expected.to contain_class("apache::params") }
@@ -24,13 +25,14 @@
2425
context "on a RedHat OS" do
2526
let :facts do
2627
{
27-
:osfamily => 'RedHat',
28-
:operatingsystemrelease => '6',
29-
:concat_basedir => '/dne',
30-
:operatingsystem => 'RedHat',
31-
:id => 'root',
32-
:kernel => 'Linux',
33-
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
28+
:osfamily => 'RedHat',
29+
:operatingsystemrelease => '6',
30+
:operatingsystemmajrelease => '6',
31+
:concat_basedir => '/dne',
32+
:operatingsystem => 'RedHat',
33+
:id => 'root',
34+
:kernel => 'Linux',
35+
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
3436
}
3537
end
3638
it { is_expected.to contain_class("apache::params") }
@@ -40,13 +42,14 @@
4042
context "on a FreeBSD OS" do
4143
let :facts do
4244
{
43-
:osfamily => 'FreeBSD',
44-
:operatingsystemrelease => '9',
45-
:concat_basedir => '/dne',
46-
:operatingsystem => 'FreeBSD',
47-
:id => 'root',
48-
:kernel => 'Linux',
49-
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
45+
:osfamily => 'FreeBSD',
46+
:operatingsystemrelease => '9',
47+
:operatingsystemmajrelease => '9',
48+
:concat_basedir => '/dne',
49+
:operatingsystem => 'FreeBSD',
50+
:id => 'root',
51+
:kernel => 'Linux',
52+
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
5053
}
5154
end
5255
it { is_expected.to contain_class("apache::params") }

0 commit comments

Comments
 (0)