Merge pull request #380 from mhaskel/test

merge 1.7.x into master
This commit is contained in:
Colleen Murphy 2014-10-28 12:37:57 -07:00
commit 06cffcdd09
8 changed files with 33 additions and 14 deletions

View 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

View 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

View 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"}
]
}

View 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

View 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

View 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'

View 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

View 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