Beispiel #1
0
def test_psutil_wrapper_accessors(aggregator):
    # Load check with empty config
    process = ProcessCheck(common.CHECK_NAME, {}, {})
    meminfo = process.psutil_wrapper(get_psutil_proc(), 'memory_info', ['rss', 'vms', 'foo'], False)
    assert 'rss' in meminfo
    assert 'vms' in meminfo
    assert 'foo' not in meminfo
Beispiel #2
0
def test_psutil_wrapper_simple_fail(aggregator):
    # Load check with empty config
    process = ProcessCheck(common.CHECK_NAME, {}, {})
    name = process.psutil_wrapper(get_psutil_proc(), 'blah', None, False)
    assert name is None
def test_psutil_wrapper_simple(aggregator):
    # Load check with empty config
    process = ProcessCheck(common.CHECK_NAME, {}, [{}])
    name = process.psutil_wrapper(get_psutil_proc(), 'name')
    assert name is not None