]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Fix: ppa options support specs
authorOleiade <tcrevon@gmail.com>
Wed, 17 Jul 2013 07:55:47 +0000 (09:55 +0200)
committerOleiade <tcrevon@gmail.com>
Wed, 17 Jul 2013 07:56:24 +0000 (09:56 +0200)
spec/defines/ppa_spec.rb

index 3baa7e86572fde065302a52258349ae4200611e4..d12c70c84d85333fa549669517b07654c9251b17 100644 (file)
@@ -20,6 +20,9 @@ describe 'apt::ppa', :type => :define do
       let :package do
         "#{platform[:package]}"
       end
+      let :options do
+        "-y"
+      end
       ['ppa:dans_ppa', 'dans_ppa','ppa:dans-daily/ubuntu'].each do |t|
         describe "with title #{t}" do
           let :pre_condition do
@@ -41,7 +44,7 @@ describe 'apt::ppa', :type => :define do
           }
 
           it { should contain_exec("add-apt-repository-#{t}").with(
-            'command' => "/usr/bin/add-apt-repository #{t}",
+            'command' => "/usr/bin/add-apt-repository #{options} #{t}",
             'creates' => "/etc/apt/sources.list.d/#{filename}",
             'require' => ["File[/etc/apt/sources.list.d]", "Package[#{package}]"],
             'notify'  => "Exec[apt_update]"
@@ -73,7 +76,7 @@ describe 'apt::ppa', :type => :define do
             "http_proxy=http://user:pass@proxy:8080",
             "https_proxy=http://user:pass@proxy:8080",
           ],
-          'command'     => "/usr/bin/add-apt-repository #{title}",
+          'command'     => "/usr/bin/add-apt-repository #{options} #{title}",
           'creates'     => "/etc/apt/sources.list.d/#{filename}",
           'require'     => ["File[/etc/apt/sources.list.d]", "Package[#{package}]"],
           'notify'      => "Exec[apt_update]"