diff options
Diffstat (limited to 'roles/openshift_health_checker/test/package_update_test.py')
-rw-r--r-- | roles/openshift_health_checker/test/package_update_test.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/roles/openshift_health_checker/test/package_update_test.py b/roles/openshift_health_checker/test/package_update_test.py new file mode 100644 index 000000000..85d3c9cab --- /dev/null +++ b/roles/openshift_health_checker/test/package_update_test.py @@ -0,0 +1,15 @@ +from openshift_checks.package_update import PackageUpdate + + +def test_package_update(): + return_value = {} + + def execute_module(module_name=None, module_args=None, *_): + assert module_name == 'check_yum_update' + assert 'packages' in module_args + # empty list of packages means "generic check if 'yum update' will work" + assert module_args['packages'] == [] + return {'foo': return_value} + + result = PackageUpdate(execute_module).run() + assert result['foo'] is return_value |