Skip to content

Commit

Permalink
Fix vhost and mod_passenger tests on deb7
Browse files Browse the repository at this point in the history
Also fix broken tests with strict variables.
  • Loading branch information
Morgan Haskel committed Oct 24, 2014
1 parent bb849cd commit 4fe8892
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 24 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1745,6 +1745,8 @@ Creates URL [`rewrites`](#rewrites) rules in vhost directories. Expects an array
}
```

***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.

######`shib_request_setting`

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.
Expand Down
4 changes: 2 additions & 2 deletions spec/acceptance/mod_passenger_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class { 'apache::mod::passenger': }
end

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

it 'should output status via passenger-memory-stats' do
shell("sudo /usr/bin/passenger-memory-stats", :pty => true) do |r|
shell("/usr/bin/passenger-memory-stats", :pty => true) do |r|
expect(r.stdout).to match(/Apache processes/)
expect(r.stdout).to match(/Nginx processes/)
expect(r.stdout).to match(/Passenger processes/)
Expand Down
3 changes: 3 additions & 0 deletions spec/acceptance/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,9 @@ class { 'apache': }
pp = <<-EOS
class { 'apache': }
host { 'test.server': ip => '127.0.0.1' }
if ! defined(Class['apache::mod::rewrite']) {
include ::apache::mod::rewrite
}
apache::vhost { 'test.server':
docroot => '/tmp',
directories => [
Expand Down
47 changes: 25 additions & 22 deletions spec/classes/mod/dav_svn_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
context "on a Debian OS" do
let :facts do
{
:lsbdistcodename => 'squeeze',
:osfamily => 'Debian',
:operatingsystemrelease => '6',
:concat_basedir => '/dne',
:operatingsystem => 'Debian',
:id => 'root',
:kernel => 'Linux',
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
:lsbdistcodename => 'squeeze',
:osfamily => 'Debian',
:operatingsystemrelease => '6',
:operatingsystemmajrelease => '6',
:concat_basedir => '/dne',
:operatingsystem => 'Debian',
:id => 'root',
:kernel => 'Linux',
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
}
end
it { is_expected.to contain_class("apache::params") }
Expand All @@ -24,13 +25,14 @@
context "on a RedHat OS" do
let :facts do
{
:osfamily => 'RedHat',
:operatingsystemrelease => '6',
:concat_basedir => '/dne',
:operatingsystem => 'RedHat',
:id => 'root',
:kernel => 'Linux',
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
:osfamily => 'RedHat',
:operatingsystemrelease => '6',
:operatingsystemmajrelease => '6',
:concat_basedir => '/dne',
:operatingsystem => 'RedHat',
:id => 'root',
:kernel => 'Linux',
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
}
end
it { is_expected.to contain_class("apache::params") }
Expand All @@ -40,13 +42,14 @@
context "on a FreeBSD OS" do
let :facts do
{
:osfamily => 'FreeBSD',
:operatingsystemrelease => '9',
:concat_basedir => '/dne',
:operatingsystem => 'FreeBSD',
:id => 'root',
:kernel => 'Linux',
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
:osfamily => 'FreeBSD',
:operatingsystemrelease => '9',
:operatingsystemmajrelease => '9',
:concat_basedir => '/dne',
:operatingsystem => 'FreeBSD',
:id => 'root',
:kernel => 'Linux',
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
}
end
it { is_expected.to contain_class("apache::params") }
Expand Down

0 comments on commit 4fe8892

Please sign in to comment.