Add lsbdistid facts where appropriate.
This commit is contained in:
parent
0a93286ff8
commit
4d188443bc
13 changed files with 20 additions and 7 deletions
|
@ -1,5 +1,6 @@
|
|||
require 'spec_helper'
|
||||
describe 'apt', :type => :class do
|
||||
let(:facts) { { :lsbdistid => 'Debian' } }
|
||||
let :default_params do
|
||||
{
|
||||
:disable_keys => :undef,
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require 'spec_helper'
|
||||
describe 'apt::debian::testing', :type => :class do
|
||||
let(:facts) { { :lsbdistid => 'Debian' } }
|
||||
it {
|
||||
should contain_apt__source("debian_testing").with({
|
||||
"location" => "http://debian.mirror.iweb.ca/debian/",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require 'spec_helper'
|
||||
describe 'apt::debian::unstable', :type => :class do
|
||||
let(:facts) { { :lsbdistid => 'Debian' } }
|
||||
it {
|
||||
should contain_apt__source("debian_unstable").with({
|
||||
"location" => "http://debian.mirror.iweb.ca/debian/",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require 'spec_helper'
|
||||
describe 'apt::params', :type => :class do
|
||||
let(:facts) { { :lsbdistid => 'Debian' } }
|
||||
let (:title) { 'my_package' }
|
||||
|
||||
it { should contain_apt__params }
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require 'spec_helper'
|
||||
describe 'apt::release', :type => :class do
|
||||
let(:facts) { { :lsbdistid => 'Debian' } }
|
||||
let (:title) { 'my_package' }
|
||||
|
||||
let :param_set do
|
||||
|
|
|
@ -2,6 +2,7 @@ require 'spec_helper'
|
|||
describe 'apt::unattended_upgrades', :type => :class do
|
||||
let(:file_unattended) { '/etc/apt/apt.conf.d/50unattended-upgrades' }
|
||||
let(:file_periodic) { '/etc/apt/apt.conf.d/10periodic' }
|
||||
let(:facts) { { :lsbdistid => 'Debian' } }
|
||||
|
||||
it { should contain_package("unattended-upgrades") }
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
require 'spec_helper'
|
||||
describe 'apt::builddep', :type => :define do
|
||||
|
||||
let(:facts) { { :lsbdistid => 'Debian' } }
|
||||
let(:title) { 'my_package' }
|
||||
|
||||
describe "should require apt-get update" do
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require 'spec_helper'
|
||||
describe 'apt::conf', :type => :define do
|
||||
let(:facts) { { :lsbdistid => 'Debian' } }
|
||||
let :title do
|
||||
'norecommends'
|
||||
end
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require 'spec_helper'
|
||||
describe 'apt::force', :type => :define do
|
||||
let(:facts) { { :lsbdistid => 'Debian' } }
|
||||
let :pre_condition do
|
||||
'include apt::params'
|
||||
end
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require 'spec_helper'
|
||||
describe 'apt::key', :type => :define do
|
||||
let(:facts) { { :lsbdistid => 'Debian' } }
|
||||
let :title do
|
||||
'8347A27F'
|
||||
end
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require 'spec_helper'
|
||||
describe 'apt::pin', :type => :define do
|
||||
let(:facts) { { :lsbdistid => 'Debian' } }
|
||||
let(:title) { 'my_pin' }
|
||||
|
||||
let :default_params do
|
||||
|
@ -12,21 +13,21 @@ describe 'apt::pin', :type => :define do
|
|||
}
|
||||
end
|
||||
|
||||
[
|
||||
[
|
||||
{ :params => {},
|
||||
:content => "# my_pin\nExplanation: : my_pin\nPackage: *\nPin: release a=my_pin\nPin-Priority: 0\n"
|
||||
},
|
||||
{
|
||||
:params => {
|
||||
:packages => 'apache',
|
||||
:packages => 'apache',
|
||||
:priority => '1'
|
||||
},
|
||||
:content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n"
|
||||
},
|
||||
{
|
||||
:params => {
|
||||
:order => 50,
|
||||
:packages => 'apache',
|
||||
:order => 50,
|
||||
:packages => 'apache',
|
||||
:priority => '1'
|
||||
},
|
||||
:content => "# my_pin\nExplanation: : my_pin\nPackage: apache\nPin: release a=my_pin\nPin-Priority: 1\n"
|
||||
|
|
|
@ -133,7 +133,8 @@ describe 'apt::ppa', :type => :define do
|
|||
end
|
||||
let :facts do
|
||||
{:lsbdistcodename => '#{platform[:lsbdistcodename]}',
|
||||
:operatingsystem => 'Ubuntu'}
|
||||
:operatingsystem => 'Ubuntu',
|
||||
:lsbdistid => 'Ubuntu'}
|
||||
end
|
||||
let(:title) { "ppa" }
|
||||
let(:release) { "#{platform[:lsbdistcodename]}" }
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require 'spec_helper'
|
||||
describe 'apt::source', :type => :define do
|
||||
let(:facts) { { :lsbdistid => 'Debian' } }
|
||||
let :title do
|
||||
'my_source'
|
||||
end
|
||||
|
@ -59,7 +60,7 @@ describe 'apt::source', :type => :define do
|
|||
end
|
||||
|
||||
let :facts do
|
||||
{:lsbdistcodename => 'karmic'}
|
||||
{:lsbdistcodename => 'karmic', :lsbdistid => 'Ubuntu'}
|
||||
end
|
||||
|
||||
let :params do
|
||||
|
@ -160,7 +161,7 @@ describe 'apt::source', :type => :define do
|
|||
let(:default_params) { Hash.new }
|
||||
let(:facts) { Hash.new }
|
||||
it { expect { should raise_error(Puppet::Error) } }
|
||||
let(:facts) { { :lsbdistcodename => 'lucid' } }
|
||||
let(:facts) { { :lsbdistcodename => 'lucid', :lsbdistid => 'Ubuntu' } }
|
||||
it { should contain_apt__source(title) }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue