예제 #1
0
def test_deprecation_notice(dd_run_check):
    check = Win32EventLogCheck('win32_event_log', {}, [common.INSTANCE])
    dd_run_check(check)
    assert (
        'This version of the check is deprecated and will be removed in a future release. '
        'Set `legacy_mode` to `false` and read about the latest options, such as `query`.'
    ) in check.get_warnings()
예제 #2
0
def new_check():
    return lambda instance, init_config=None: Win32EventLogCheck(
        'win32_event_log', init_config or {}, [instance])
예제 #3
0
def check():
    check = Win32EventLogCheck('win32_event_log', {}, [INSTANCE])
    return check
예제 #4
0
def test_basic_check(aggregator):
    check = Win32EventLogCheck('win32_event_log', {}, [common.INSTANCE])
    check.check(common.INSTANCE)  # First run just initialises timestamp
    check.check(common.INSTANCE)
예제 #5
0
def test_check():
    check = Win32EventLogCheck('win32_event_log', {}, [INSTANCE])

    with pytest.raises(NotImplementedError):
        check.check(INSTANCE)