From 8453d40138e0f94fea8291c8299fc15aced9afed Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Fri, 21 Feb 2014 09:34:46 -0800 Subject: [PATCH] Missed the - for -y, but also tests were missing lsbdistid --- Gemfile | 1 + manifests/params.pp | 4 ++-- spec/defines/ppa_spec.rb | 18 +++++++++++++----- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index cd7fbc8..1e359d0 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/manifests/params.pp b/manifests/params.pp index ae46443..51a01be 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -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' } } } diff --git a/spec/defines/ppa_spec.rb b/spec/defines/ppa_spec.rb index dc1173b..6a571a8 100644 --- a/spec/defines/ppa_spec.rb +++ b/spec/defines/ppa_spec.rb @@ -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 -- 2.32.3