mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
[yumpkg] Skip test_pkg_upgrade_has_pending_upgrades if there are no upgrades
yumpkg.list_upgrades returns an empty dictionary when no upgrades are available. We need to check for this situation and skip the test if no upgrades are present. Fixes the test failure on Fedora 24 on Jenkins currently, but also protects against any potential failures for other RHEL-based distros that aren't currently failing because "ret" is populated with a dictionary of upgrades.
This commit is contained in:
parent
b7f87e0aed
commit
32829b9474
1 changed files with 1 additions and 1 deletions
|
@ -276,7 +276,7 @@ class PkgModuleTest(integration.ModuleCase,
|
|||
self.assertIn('vim', ret['changes'])
|
||||
else:
|
||||
ret = self.run_function('pkg.list_updates')
|
||||
if ret == '':
|
||||
if ret == '' or ret == {}:
|
||||
self.skipTest('No updates available for this machine. Skipping pkg.upgrade test.')
|
||||
else:
|
||||
ret = self.run_function(func)
|
||||
|
|
Loading…
Add table
Reference in a new issue