summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker/test/package_update_test.py
blob: 7d9035a36eccbff93c9be91cb35b6b27c75860d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from openshift_checks.package_update import PackageUpdate


def test_package_update():
    return_value = object()

    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