set default facts for all manifests

This commit is contained in:
Matthew Haughton 2013-12-06 10:31:46 -05:00 committed by Matthew Haughton
parent db68cf39ae
commit 36319cd5e0
10 changed files with 8 additions and 23 deletions

View file

@ -23,7 +23,6 @@ describe 'nginx::config' do
{
:osfamily => facts[:osfamily],
:operatingsystem => facts[:operatingsystem],
:kernel => 'linux',
}
end
@ -104,7 +103,6 @@ describe 'nginx::config' do
{
:osfamily => facts[:osfamily],
:operatingsystem => facts[:operatingsystem],
:kernel => 'linux',
}
end
it { should contain_file("/var/nginx/client_body_temp").with(:owner => 'www-data')}
@ -134,7 +132,6 @@ describe 'nginx::config' do
{
:osfamily => facts[:osfamily],
:operatingsystem => facts[:operatingsystem],
:kernel => 'linux',
}
end
it { should contain_file("/var/nginx/client_body_temp").with(:owner => 'nginx')}
@ -150,7 +147,6 @@ describe 'nginx::config' do
{
:osfamily => 'debian',
:operatingsystem => 'debian',
:kernel => 'linux',
}
end

View file

@ -12,11 +12,9 @@ describe 'nginx' do
context "on a Debian OS" do
let :facts do
{
:kernel => 'linux',
:operatingsystem => 'Debian',
:osfamily => 'Debian',
:lsbdistcodename => 'precise',
:concat_basedir => '/var/lib/puppet/concat',
}
end
@ -32,10 +30,8 @@ describe 'nginx' do
context "on a RedHat OS" do
let :facts do
{
:kernel => 'linux',
:operatingsystem => 'RedHat',
:osfamily => 'RedHat',
:concat_basedir => '/var/lib/puppet/concat',
}
end
@ -51,10 +47,8 @@ describe 'nginx' do
context "on a Suse OS" do
let :facts do
{
:kernel => 'linux',
:operatingsystem => 'SuSE',
:osfamily => 'Suse',
:concat_basedir => '/var/lib/puppet/concat',
}
end

View file

@ -35,7 +35,7 @@ describe 'nginx::package' do
end
describe 'installs the requested package version' do
let(:facts) {{ :kernel => 'linux', :operatingsystem => 'redhat', :osfamily => 'redhat' }}
let(:facts) {{ :operatingsystem => 'redhat', :osfamily => 'redhat' }}
let(:params) {{ :package_ensure => '3.0.0' }}
it 'installs 3.0.0 exactly' do

View file

@ -5,7 +5,6 @@ describe 'nginx::params' do
let :facts do {
:osfamily => 'debian',
:operatingsystem => 'debian',
:kernel => 'Linux',
} end
it { should contain_nginx__params }

View file

@ -4,7 +4,6 @@ describe 'nginx::service' do
let :facts do {
:osfamily => 'Debian',
:operatingsystem => 'debian',
:kernel => 'Linux',
} end
let :pre_condition do

View file

@ -8,8 +8,6 @@ describe 'nginx::resource::location' do
{
:osfamily => 'Debian',
:operatingsystem => 'debian',
:kernel => 'Linux',
:concat_basedir => '/var/lib/puppet/concat',
}
end
let :pre_condition do

View file

@ -8,9 +8,7 @@ describe 'nginx::resource::mailhost' do
{
:osfamily => 'debian',
:operatingsystem => 'debian',
:kernel => 'Linux',
:ipaddress6 => '::',
:concat_basedir => '/var/lib/puppet/concat',
}
end
let :default_params do

View file

@ -5,10 +5,6 @@ describe 'nginx::resource::upstream' do
'upstream-test'
end
let :facts do {
:concat_basedir => '/var/lib/puppet/concat',
} end
let :default_params do
{
:members => ['test'],

View file

@ -14,9 +14,7 @@ describe 'nginx::resource::vhost' do
{
:osfamily => 'Debian',
:operatingsystem => 'debian',
:kernel => 'Linux',
:ipaddress6 => '::',
:concat_basedir => '/var/lib/puppet/concat',
}
end
let :pre_condition do

View file

@ -1 +1,8 @@
require 'puppetlabs_spec_helper/module_spec_helper'
RSpec.configure do |c|
c.default_facts = {
:kernel => 'Linux',
:concat_basedir => '/var/lib/puppet/concat',
}
end