forked from evolvingweb/puppet-apt
-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #832 from aboks/apt-task
Add support for dist-upgrade & autoremove action
- Loading branch information
Showing
3 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,29 @@ | ||
# run a test task | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'apt tasks' do | ||
describe 'update and upgrade', if: pe_install? && puppet_version =~ %r{(5\.\d\.\d)} && fact_on(master, 'osfamily') == 'Debian' do | ||
it 'execute arbitary sql' do | ||
describe 'apt tasks', if: pe_install? && puppet_version =~ %r{(5\.\d\.\d)} && fact_on(master, 'osfamily') == 'Debian' do | ||
describe 'update' do | ||
it 'updates package lists' do | ||
result = run_task(task_name: 'apt', params: 'action=update') | ||
expect_multiple_regexes(result: result, regexes: [%r{Reading package lists}, %r{Job completed. 1/1 nodes succeeded}]) | ||
end | ||
end | ||
describe 'upgrade' do | ||
it 'upgrades packages' do | ||
result = run_task(task_name: 'apt', params: 'action=upgrade') | ||
expect_multiple_regexes(result: result, regexes: [%r{\d+ upgraded, \d+ newly installed, \d+ to remove and \d+ not upgraded}, %r{Job completed. 1/1 nodes succeeded}]) | ||
end | ||
end | ||
describe 'dist-upgrade' do | ||
it 'dist-upgrades packages' do | ||
result = run_task(task_name: 'apt', params: 'action=dist-upgrade') | ||
expect_multiple_regexes(result: result, regexes: [%r{\d+ upgraded, \d+ newly installed, \d+ to remove and \d+ not upgraded}, %r{Job completed. 1/1 nodes succeeded}]) | ||
end | ||
end | ||
describe 'autoremove' do | ||
it 'autoremoves obsolete packages' do | ||
result = run_task(task_name: 'apt', params: 'action=autoremove') | ||
expect_multiple_regexes(result: result, regexes: [%r{\d+ upgraded, \d+ newly installed, \d+ to remove and \d+ not upgraded}, %r{Job completed. 1/1 nodes succeeded}]) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters