Missed the - for -y, but also tests were missing lsbdistid

This commit is contained in:
Hunter Haugen 2014-02-21 09:34:46 -08:00
parent b7b4153e91
commit 8453d40138
3 changed files with 16 additions and 7 deletions

View file

@ -2,6 +2,7 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
group :development, :test do
gem 'rake', :require => false
gem 'pry', :require => false
gem 'rspec-puppet', :require => false
gem 'puppet-lint', :require => false
gem 'puppetlabs_spec_helper', :require => false

View file

@ -23,7 +23,7 @@ class apt::params {
case $::lsbdistcodename {
'hardy','maverick','natty','oneiric','precise': {
$backports_location = 'http://us.archive.ubuntu.com/ubuntu'
$ppa_options = 'y'
$ppa_options = '-y'
}
'lucid': {
$backports_location = 'http://us.archive.ubuntu.com/ubuntu'
@ -31,7 +31,7 @@ class apt::params {
}
default: {
$backports_location = 'http://old-releases.ubuntu.com/ubuntu'
$ppa_options = 'y'
$ppa_options = '-y'
}
}
}

View file

@ -1,20 +1,28 @@
require 'spec_helper'
describe 'apt::ppa', :type => :define do
[ { :lsbdistrelease => '11.04',
[
{
:lsbdistrelease => '11.04',
:lsbdistcodename => 'natty',
:operatingsystem => 'Ubuntu',
:package => 'python-software-properties'},
{ :lsbdistrelease => '12.10',
:lsbdistid => 'Ubuntu',
:package => 'python-software-properties'
},
{
:lsbdistrelease => '12.10',
:lsbdistcodename => 'quantal',
:operatingsystem => 'Ubuntu',
:package => 'software-properties-common'},
:lsbdistid => 'Ubuntu',
:package => 'software-properties-common'
},
].each do |platform|
context "on #{platform[:lsbdistcodename]}" do
let :facts do
{
:lsbdistrelease => platform[:lsbdistrelease],
:lsbdistrelease => platform[:lsbdistrelease],
:lsbdistcodename => platform[:lsbdistcodename],
:operatingsystem => platform[:operatingsystem],
:lsbdistid => platform[:lsbdistid],
}
end
let :release do