def test_psutil_wrapper_simple(aggregator): # Load check with empty config myprocess = Process(CHECK_NAME, {}, {}, aggregator) name = myprocess.psutil_wrapper( get_psutil_proc(), 'name', None, ) assert name is not None
def test_psutil_wrapper_simple_fail(aggregator): # Load check with empty config myprocess = Process(CHECK_NAME, {}, {}, aggregator) name = myprocess.psutil_wrapper( get_psutil_proc(), 'blah', None, False ) assert name is None
def test_psutil_wrapper_accessors_fail(aggregator): # Load check with empty config myprocess = Process(CHECK_NAME, {}, {}, aggregator) meminfo = myprocess.psutil_wrapper( get_psutil_proc(), 'memory_infoo', ['rss', 'vms'], False ) assert 'rss' not in meminfo assert 'vms' not in meminfo