Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lsbdistid facts where appropriate. #244

Merged
merged 1 commit into from
Feb 25, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions spec/classes/apt_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'spec_helper'
describe 'apt', :type => :class do
let(:facts) { { :lsbdistid => 'Debian' } }
let :default_params do
{
:disable_keys => :undef,
Expand Down
1 change: 1 addition & 0 deletions spec/classes/debian_testing_spec.rb
Original file line number Diff line number Diff line change
@@ -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/",
Expand Down
1 change: 1 addition & 0 deletions spec/classes/debian_unstable_spec.rb
Original file line number Diff line number Diff line change
@@ -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/",
Expand Down
1 change: 1 addition & 0 deletions spec/classes/params_spec.rb
Original file line number Diff line number Diff line change
@@ -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 }
Expand Down
1 change: 1 addition & 0 deletions spec/classes/release_spec.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions spec/classes/unattended_upgrades_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
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") }

Expand Down
1 change: 1 addition & 0 deletions spec/defines/builddep_spec.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions spec/defines/conf_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'spec_helper'
describe 'apt::conf', :type => :define do
let(:facts) { { :lsbdistid => 'Debian' } }
let :title do
'norecommends'
end
Expand Down
1 change: 1 addition & 0 deletions spec/defines/force_spec.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions spec/defines/key_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'spec_helper'
describe 'apt::key', :type => :define do
let(:facts) { { :lsbdistid => 'Debian' } }
let :title do
'8347A27F'
end
Expand Down
9 changes: 5 additions & 4 deletions spec/defines/pin_spec.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -12,21 +13,21 @@
}
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"
Expand Down
3 changes: 2 additions & 1 deletion spec/defines/ppa_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@
end
let :facts do
{:lsbdistcodename => '#{platform[:lsbdistcodename]}',
:operatingsystem => 'Ubuntu'}
:operatingsystem => 'Ubuntu',
:lsbdistid => 'Ubuntu'}
end
let(:title) { "ppa" }
let(:release) { "#{platform[:lsbdistcodename]}" }
Expand Down
5 changes: 3 additions & 2 deletions spec/defines/source_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'spec_helper'
describe 'apt::source', :type => :define do
let(:facts) { { :lsbdistid => 'Debian' } }
let :title do
'my_source'
end
Expand Down Expand Up @@ -59,7 +60,7 @@
end

let :facts do
{:lsbdistcodename => 'karmic'}
{:lsbdistcodename => 'karmic', :lsbdistid => 'Ubuntu'}
end

let :params do
Expand Down Expand Up @@ -160,7 +161,7 @@
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