Пример #1
0
def test_process_logs(mocker, mock_config, names, expected):
    mock_config({
        'logs':
        OrderedDict([('b', object()), ('a', object()), ('c', object())])
    })
    process_log = mocker.patch('logstapo.logs.process_log')
    process_logs(names)
    process_log.assert_has_calls([call(x) for x in expected])
Пример #2
0
def test_process_logs(mocker, mock_config, names, expected):
    mock_config({'logs': OrderedDict([('b', object()), ('a', object()), ('c', object())])})
    process_log = mocker.patch('logstapo.logs.process_log')
    process_logs(names)
    process_log.assert_has_calls([call(x) for x in expected])
Пример #3
0
def run():
    """Run logstapo on all configured logs and perform actions"""
    results = process_logs()
    run_actions(results)