modules.pkg int tests: skip refresh_db upon error (#34072)

This commit is contained in:
Justin Findlay 2016-06-17 09:35:47 -06:00 committed by Thomas S Hatch
parent 1b76de1557
commit 6d0d52fa86

View file

@ -193,6 +193,8 @@ class PkgModuleTest(integration.ModuleCase,
self.assertIn(ret, (True, None))
elif os_family == 'Debian':
ret = self.run_function(func)
if not isinstance(ret, dict):
self.skipTest('{0} encountered an error: {1}'.format(func, ret))
self.assertNotEqual(ret, {})
for source, state in ret.items():
self.assertIn(state, (True, False, None))