8a1981f640
There were some bugs in the existing $::operatingsystem based approach.
* amazon was it's own package set when it's properly part of $::osfamily ==
'redhat' as of facter >= 1.7.2
* gentoo was improperly part of the amazon package set; this patch removes
support for gentoo but it was broken anyways
modifications to nginx:📦:redhat were made as well
* it no longer tries to setup the nginx.org yumrepo for fedora as no packages
for fedora are currently provided
* amazon release numbers are inconsistent with EL. Unknown
$::lsbmajdistrelease values are now mapped to 6 so it's no longer nessicary to
test for $::lsbmajdistrelease being undefined. This logic will need to be
reworked after RHEL7.x is released.
* the url to the nginx repo was including $::operatingsystem in it but
nginx.org only has package dirs for 'rhel' & 'centos' which are presently
identical; the usage of the 'rhel' dir has been hardcoded. This fixes broken
yum repo setup for all $::osfamily == 'redhat' platforms other than redhat and
centos.
25 lines
562 B
Ruby
25 lines
562 B
Ruby
require 'spec_helper'
|
|
|
|
describe 'nginx' do
|
|
|
|
shared_examples 'linux' do |operatingsystem, user|
|
|
let(:facts) {{ :kernel => 'linux', :operatingsystem => operatingsystem, :osfamily => operatingsystem }}
|
|
|
|
it { should contain_service('nginx').with(
|
|
:ensure => 'running',
|
|
:enable => true
|
|
) }
|
|
|
|
it { should contain_file('/var/nginx/client_body_temp').with_owner(user) }
|
|
end
|
|
|
|
|
|
context 'redhat' do
|
|
it_behaves_like 'linux', 'redhat', 'nginx'
|
|
end
|
|
|
|
context 'debian' do
|
|
it_behaves_like 'linux', 'debian', 'www-data'
|
|
end
|
|
|
|
end
|