package_update_test.py 524 B

123456789101112131415
  1. from openshift_checks.package_update import PackageUpdate
  2. def test_package_update():
  3. return_value = object()
  4. def execute_module(module_name=None, module_args=None, *_):
  5. assert module_name == 'check_yum_update'
  6. assert 'packages' in module_args
  7. # empty list of packages means "generic check if 'yum update' will work"
  8. assert module_args['packages'] == []
  9. return {'foo': return_value}
  10. result = PackageUpdate(execute_module).run()
  11. assert result['foo'] is return_value