]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Merge pull request #380 from mhaskel/test
authorColleen Murphy <cmurphy@users.noreply.github.com>
Tue, 28 Oct 2014 19:37:57 +0000 (12:37 -0700)
committerColleen Murphy <cmurphy@users.noreply.github.com>
Tue, 28 Oct 2014 19:37:57 +0000 (12:37 -0700)
merge 1.7.x into master

CHANGELOG.md
lib/facter/apt_updates.rb
metadata.json
spec/spec_helper_acceptance.rb
spec/unit/facter/apt_has_updates_spec.rb
spec/unit/facter/apt_package_updates_spec.rb
spec/unit/facter/apt_security_updates_spec.rb
spec/unit/facter/apt_updates_spec.rb

index 4a325f42f2496d200ea888ea15effc2f1613110c..736c0177a8b7307d4e555a424661f8ae0f2a7616 100644 (file)
@@ -1,3 +1,25 @@
+##2014-10-28 - Supported Release 1.7.0
+###Summary
+
+This release includes several new features, documentation and test improvements, and a few bug fixes.
+
+####Features
+- Updated unit and acceptance tests
+- Update module to work with Linux Mint
+- Documentation updates
+- Future parser / strict variables support
+- Improved support for long GPG keys
+- New parameters!
+  - Added `apt_update_frequency` to apt
+  - Added `cfg_files` and `cfg_missing` parameters to apt::force
+  - Added `randomsleep` to apt::unattended_upgrades
+- Added `apt_update_last_success` fact
+- Refactored facts for performance improvements
+
+####Bugfixes
+- Update apt::builddep to require Exec['apt_update'] instead of notifying it
+- Clean up lint errors
+
 ##2014-08-20 - Supported Release 1.6.0
 ###Summary
 
index 75670bc39767280c0d8fbd2ddfa7121ded3ffe30..77e667e6d76c18f8f2eed5adc3b2dad187035c32 100644 (file)
@@ -2,7 +2,7 @@ apt_package_updates = nil
 Facter.add("apt_has_updates") do
   confine :osfamily => 'Debian'
   if File.executable?("/usr/lib/update-notifier/apt-check")
-    apt_package_updates = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check 2>&1').split(';')
+    apt_package_updates = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check 2>/dev/null').split(';')
   end
 
   setcode do
@@ -13,7 +13,7 @@ end
 Facter.add("apt_package_updates") do
   confine :apt_has_updates => true
   setcode do
-    packages = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check -p 2>&1').split("\n")
+    packages = Facter::Util::Resolution.exec('/usr/lib/update-notifier/apt-check -p 2>/dev/null').split("\n")
     if Facter.version < '2.0.0'
       packages.join(',')
     else
index 1403e1406dfc63e77cf1cb120b49d19a89f726ab..a92b8a7bf646fd9d59b355e2a6e5a38b19c749c7 100644 (file)
@@ -1,12 +1,12 @@
 {
   "name": "puppetlabs-apt",
-  "version": "1.6.0",
+  "version": "1.7.0",
   "author": "Puppet Labs",
   "summary": "Puppet Labs Apt Module",
   "license": "Apache-2.0",
   "source": "https://github.com/puppetlabs/puppetlabs-apt",
   "project_page": "https://github.com/puppetlabs/puppetlabs-apt",
-  "issues_url": "https://github.com/puppetlabs/puppetlabs-apt/issues",
+  "issues_url": "https://tickets.puppetlabs.com/browse/MODULES",
   "operatingsystem_support": [
     {
       "operatingsystem": "Debian",
@@ -35,9 +35,6 @@
     }
   ],
   "dependencies": [
-    {
-      "name": "puppetlabs/stdlib",
-      "version_requirement": ">= 2.2.1"
-    }
+    {"name":"puppetlabs/stdlib","version_requirement":">= 2.2.1"}
   ]
 }
index fd1f2c56b9c0167498523d675a46a1ec433dcdd4..a523bb8321eb13f2db3e8b792f879ea48b76ac9f 100644 (file)
@@ -25,8 +25,8 @@ RSpec.configure do |c|
   # Configure all nodes in nodeset
   c.before :suite do
     # Install module and dependencies
-    puppet_module_install(:source => proj_root, :module_name => 'apt')
     hosts.each do |host|
+      copy_module_to(host, :source => proj_root, :module_name => 'apt')
       shell("/bin/touch #{default['puppetpath']}/hiera.yaml")
       shell('puppet module install puppetlabs-stdlib --version 2.2.1', { :acceptable_exit_codes => [0,1] })
     end
index 9a444db5b416922877929022246552e4d81823fd..691fb32280308af603eb66a8a2b8132cfed9e090 100644 (file)
@@ -26,7 +26,7 @@ describe 'apt_has_updates fact' do
       File.stubs(:executable?) # Stub all other calls
       Facter::Util::Resolution.stubs(:exec) # Catch all other calls
       File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true
-      Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "4;3"
+      Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>/dev/null').returns "4;3"
     }
     it { should be true }
   end
index 5c7a624f4d7f2688ca367b62676870cfc35b70ce..c0f54f23af80260a752240f598bfc069ce188377 100644 (file)
@@ -17,8 +17,8 @@ describe 'apt_package_updates fact' do
       File.stubs(:executable?) # Stub all other calls
       Facter::Util::Resolution.stubs(:exec) # Catch all other calls
       File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true
-      Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "1;2"
-      Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check -p 2>&1').returns "puppet-common\nlinux-generic\nlinux-image-generic"
+      Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>/dev/null').returns "1;2"
+      Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check -p 2>/dev/null').returns "puppet-common\nlinux-generic\nlinux-image-generic"
     }
     it {
       if Facter.version < '2.0.0'
index 4bc760f7898ca406a20053fcb61917aa6879063f..a5d26c76cf7408dd1c2b24a827f566cb49aabdb0 100644 (file)
@@ -17,7 +17,7 @@ describe 'apt_security_updates fact' do
       File.stubs(:executable?) # Stub all other calls
       Facter::Util::Resolution.stubs(:exec) # Catch all other calls
       File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true
-      Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "14;7"
+      Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>/dev/null').returns "14;7"
     }
     it { should == 7 }
   end
index 7e9b77f84f695cecb108c9cc9897ea7254d411a6..538466f999e628572501b285016f4ab0f2a1604f 100644 (file)
@@ -17,7 +17,7 @@ describe 'apt_updates fact' do
       File.stubs(:executable?) # Stub all other calls
       Facter::Util::Resolution.stubs(:exec) # Catch all other calls
       File.expects(:executable?).with('/usr/lib/update-notifier/apt-check').returns true
-      Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>&1').returns "14;7"
+      Facter::Util::Resolution.expects(:exec).with('/usr/lib/update-notifier/apt-check 2>/dev/null').returns "14;7"
     }
     it { should == 14 }
   end